isExistを引数なしでも実行できるように

This commit is contained in:
r-ca 2024-01-09 13:50:47 +09:00
parent e055f8fe9e
commit d88c9c2030
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,7 @@ public interface FileManager {
File getFileRef();
boolean isExist(String name) throws IOException;
boolean isExist() throws IOException;
boolean isDirectory();
boolean isFile();
boolean isWritable();

View File

@ -76,6 +76,11 @@ public class FileManagerImpl implements FileManager {
return Files.exists(resolvedPath);
}
@Override
public boolean isExist() throws IOException {
return Files.exists(this.path);
}
@Override
public boolean isDirectory() {
if (this.isExist()) {