From a887446d2114b2cdea2b5ffa08e6d3322c0cf467 Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 9 Jan 2024 13:44:28 +0900 Subject: [PATCH] =?UTF-8?q?isExist=E3=81=AE=E5=AE=9F=E8=A3=85=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/one/nem/lacerta/source/file/FileManager.java | 2 +- .../one/nem/lacerta/source/file/impl/FileManagerImpl.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 97fb1dae..cad34d3b 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 @@ -14,7 +14,7 @@ import java.util.List; public interface FileManager { File getFileRef(); - boolean isExist(); + boolean isExist(String name) throws IOException; boolean isDirectory(); boolean isFile(); boolean isWritable(); 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 af0d4a25..21987841 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 @@ -71,9 +71,9 @@ public class FileManagerImpl implements FileManager { } @Override - public boolean isExist() { - File file = this.path.toFile(); - return file.exists(); + public boolean isExist(String name) throws IOException { + Path resolvedPath = this.resolveStringPath(name); + return Files.exists(resolvedPath); } @Override