mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 19:47:36 +00:00
ファイルを取得するメソッド作成
This commit is contained in:
2 files changed
+15
No files matched your search
@@ -23,6 +23,9 @@ public interface FileManager {
|
||||
File createFile(String fileName);
|
||||
void removeFile(String fileName);
|
||||
|
||||
File getFile(String fileName);
|
||||
File getFile(Path path);
|
||||
|
||||
boolean isExist(Path path);
|
||||
boolean isExist(String fileName);
|
||||
|
||||
|
||||
@@ -137,6 +137,18 @@ public class FileManagerImpl implements FileManager {
|
||||
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
|
||||
public boolean isExist(Path path) {
|
||||
logger.debug("isExist", "called");
|
||||
|
||||
Reference in new issue
Block a user