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 {
File getFileRef();
boolean isExist();
boolean isExist(String name) throws IOException;
boolean isDirectory();
boolean isFile();
boolean isWritable();

View File

@ -71,9 +71,9 @@ public class FileManagerImpl implements FileManager {
}
@Override
public boolean isExist() {
File file = this.path.toFile();
return file.exists();
public boolean isExist(String name) throws IOException {
Path resolvedPath = this.resolveStringPath(name);
return Files.exists(resolvedPath);
}
@Override