createFile実装

This commit is contained in:
r-ca 2024-01-09 12:52:18 +09:00
parent 3a9053e987
commit b0c97da382
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -167,12 +167,19 @@ public class FileManagerImpl implements FileManager {
@Override
public FileManager createFile() throws IOException {
return null;
try {
Files.createFile(this.path);
} catch (Exception e) {
logger.error("createFile", e.getMessage());
throw new IOException("Failed to create file");
}
return this;
}
@Override
public FileManager createFile(String fileName) throws IOException {
return null;
public FileManager createFile(String fileName) throws IOException { // pathが書き換わってしまうのは想像できない挙動かも
this.resolve(fileName);
return this.createFile();
}
@Override