From a2eb04e96bc66ec43a29b7f1898d71336ff49413 Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 9 Jan 2024 12:52:39 +0900 Subject: [PATCH] =?UTF-8?q?createDirectory=E5=AE=9F=E8=A3=85=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/source/file/impl/FileManagerImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 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 5a59a4d1..fc0d828e 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 @@ -184,12 +184,19 @@ public class FileManagerImpl implements FileManager { @Override public FileManager createDirectory() throws IOException { - return null; + try { + Files.createDirectory(this.path); + } catch (Exception e) { + logger.error("createDirectory", e.getMessage()); + throw new IOException("Failed to create directory"); + } + return this; } @Override public FileManager createDirectory(String directoryName) throws IOException { - return null; + this.resolve(directoryName); + return this.createDirectory(); } // Internal