From 52657fdbbd008eaf62fa0f23b2c0bd600f5eb709 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 8 Jan 2024 11:42:58 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8B=E3=83=A1=E3=82=BD=E3=83=83?= =?UTF-8?q?=E3=83=89=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/file/FileManager.java | 3 +++ .../lacerta/source/file/impl/FileManagerImpl.java | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java index d69d9972..f620f239 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/FileManager.java +++ b/source/src/main/java/one/nem/lacerta/source/file/FileManager.java @@ -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); diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 73a126ec..7a25adef 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -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");