Fully mirgate main source to Java NIO (except some files in tools).

This commit is contained in:
Đạt Nhân Trương
2022-08-06 18:13:47 +07:00
parent 571d804f50
commit 61c3e75a52
5 changed files with 14 additions and 12 deletions

View File

@@ -24,7 +24,6 @@ package provider;
import provider.wz.WZFiles;
import provider.wz.XMLWZFile;
import java.io.File;
import java.nio.file.Path;
public class DataProviderFactory {

View File

@@ -1,6 +1,6 @@
package provider.wz;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -38,7 +38,7 @@ public enum WZFiles {
private static String getWzDirectory() {
// Either provide a custom directory path through the "wz-path" property when launching the .jar, or don't provide one to use the default "wz" directory
String propertyPath = System.getProperty("wz-path");
if (propertyPath != null && new File(propertyPath).isDirectory()) {
if (propertyPath != null && Files.isDirectory(Paths.get(propertyPath))) {
return propertyPath;
}

View File

@@ -34,7 +34,6 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.awt.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Path;