mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2025-01-19 02:43:15 +00:00
ファイルを取得するメソッド作成
This commit is contained in:
parent
88cd58f920
commit
52657fdbbd
|
@ -23,6 +23,9 @@ public interface FileManager {
|
||||||
File createFile(String fileName);
|
File createFile(String fileName);
|
||||||
void removeFile(String fileName);
|
void removeFile(String fileName);
|
||||||
|
|
||||||
|
File getFile(String fileName);
|
||||||
|
File getFile(Path path);
|
||||||
|
|
||||||
boolean isExist(Path path);
|
boolean isExist(Path path);
|
||||||
boolean isExist(String fileName);
|
boolean isExist(String fileName);
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,18 @@ public class FileManagerImpl implements FileManager {
|
||||||
currentDir.resolve(fileName).toFile().delete(); // TODO-rca: エラーハンドリング
|
currentDir.resolve(fileName).toFile().delete(); // TODO-rca: エラーハンドリング
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getFile(String fileName) {
|
||||||
|
logger.debug("getFile", "called");
|
||||||
|
return currentDir.resolve(fileName).toFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getFile(Path path) {
|
||||||
|
logger.debug("getFile", "called");
|
||||||
|
return path.toFile();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isExist(Path path) {
|
public boolean isExist(Path path) {
|
||||||
logger.debug("isExist", "called");
|
logger.debug("isExist", "called");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user