From 6a98deab83a8c38805aa8ab884e4d06f0681d473 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 25 Dec 2023 13:33:28 +0900 Subject: [PATCH] =?UTF-8?q?FileManager=E3=81=AB=E6=99=AE=E9=80=9A=E3=81=AE?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E8=AA=AD=E3=81=BF=E6=9B=B8?= =?UTF-8?q?=E3=81=8D=E3=82=92=E8=BF=BD=E5=8A=A0=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/source/file/impl/FileManagerImpl.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 43778c5b..969ead70 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 @@ -106,17 +106,25 @@ public class FileManagerImpl implements FileManager { @Override public void saveFileAtCurrent(File file) { - + try { + Files.copy(file.toPath(), currentDir.resolve(file.getName())); + } catch (IOException e) { + e.printStackTrace(); + } } @Override public File getFile(Path path) { - return null; + // ファイルを取得する + return path.toFile(); } @Override public void removeFile(Path path) { - + // ファイルを削除する + if (path.toFile().exists()) { + path.toFile().delete(); // Resultを返す? + } } }