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

Commit b0b8e2f

Browse files
authored
Create FileUtils.java
1 parent fbf0d56 commit b0b8e2f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package id.my.alvinq.prokitid.libs
2+
3+
import java.io.IOException;
4+
import java.nio.file.Files;
5+
import java.nio.file.Path;
6+
import java.nio.file.StandardCopyOption;
7+
8+
public class FileUtils {
9+
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+
);
15+
}
16+
}

0 commit comments

Comments
 (0)