isExistの実装を変更

This commit is contained in:
r-ca 2024-01-09 13:44:28 +09:00
parent b3a4207762
commit a887446d21
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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