Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

Commit 48d8cb2

Browse files
authored
Update FileUtils.java
1 parent 727174e commit 48d8cb2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
package id.my.alvinq.prokitid.libs;
22

33
import java.io.IOException;
4-
import java.nio.file.Files;
5-
import java.nio.file.Path;
6-
import java.nio.file.StandardCopyOption;
4+
import java.nio.file.*;
5+
import java.nio.file.attribute.BasicFileAttributes;
76

87
public class FileUtils {
98
public static void copyFile(String from, String to) throws IOException {
10-
Files.copy(
11-
Path.of(from),
12-
Path.of(to),
13-
StandardCopyOption.REPLACE_EXISTING // overwrite jika file sudah ada
14-
);
9+
Files.copy(Paths.get(from), Paths.get(to), StandardCopyOption.REPLACE_EXISTING);
1510
}
1611
}

0 commit comments

Comments
 (0)