mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
読み書きの確認の前にファイルの存在を確認するように
This commit is contained in:
parent
5c931ece3f
commit
9e5b2dad46
|
@ -88,14 +88,22 @@ public class FileManagerImpl implements FileManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isReadable() {
|
public boolean isReadable() {
|
||||||
File file = this.path.toFile();
|
if (this.isExist()) {
|
||||||
return file.canRead();
|
File file = this.path.toFile();
|
||||||
|
return file.canRead();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isWritable() {
|
public boolean isWritable() {
|
||||||
File file = this.path.toFile();
|
if (this.isExist()) {
|
||||||
return file.canWrite();
|
File file = this.path.toFile();
|
||||||
|
return file.canWrite();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user