createFileの場合でも親ディレクトリを生成するように

This commit is contained in:
r-ca 2024-01-09 14:24:43 +09:00
parent 360580eff2
commit 4cf3ff5f3c
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -173,6 +173,9 @@ public class FileManagerImpl implements FileManager {
@Override
public FileManager createFile() throws IOException {
try {
if (this.autoCreateParent) {
Files.createDirectories(this.path.getParent());
}
Files.createFile(this.path);
} catch (Exception e) {
logger.error("createFile", e.getMessage());