Upgrade to Java NIO

This commit is contained in:
Đạt Nhân Trương
2022-07-30 16:10:46 +07:00
parent d42a57ef79
commit a44744c05b
35 changed files with 553 additions and 500 deletions
+5 -3
View File
@@ -1,6 +1,8 @@
package provider.wz;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
public enum WZFiles {
QUEST("Quest"),
@@ -25,12 +27,12 @@ public enum WZFiles {
this.fileName = name + ".wz";
}
public File getFile() {
return new File(DIRECTORY, fileName);
public Path getFile() {
return Paths.get(DIRECTORY).resolve(fileName);
}
public String getFilePath() {
return getFile().getPath();
return getFile().toString();
}
private static String getWzDirectory() {