isExistの実装を変更

This commit is contained in:
r-ca committed 2024-01-09 13:44:28 +09:00
1 parent b3a4207762
commit a887446d21
2 files changed
+4 -4

No files matched your search

@@ -14,7 +14,7 @@ import java.util.List;
public interface FileManager { public interface FileManager {
File getFileRef(); File getFileRef();
boolean isExist(); boolean isExist(String name) throws IOException;
boolean isDirectory(); boolean isDirectory();
boolean isFile(); boolean isFile();
boolean isWritable(); boolean isWritable();
@@ -71,9 +71,9 @@ public class FileManagerImpl implements FileManager {
} }
@Override @Override
public boolean isExist() { public boolean isExist(String name) throws IOException {
File file = this.path.toFile(); Path resolvedPath = this.resolveStringPath(name);
return file.exists(); return Files.exists(resolvedPath);
} }
@Override @Override