mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
createIfNotExists
This commit is contained in:
parent
99c97714e3
commit
1370e494fa
@ -267,10 +267,10 @@ public class ScriptShellMethods {
|
|||||||
return FileUtilities.copyAs(self, new File(destination, self.getName()));
|
return FileUtilities.copyAs(self, new File(destination, self.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createFileIfNotExists(File self) throws IOException {
|
public static void createIfNotExists(File self) throws IOException {
|
||||||
if (!self.isFile()) {
|
if (!self.isFile()) {
|
||||||
// create parent folder structure if necessary & create file
|
// create parent folder structure if necessary & create file
|
||||||
Files.createDirectories(self.getParentFile().toPath());
|
Files.createDirectories(self.toPath().getParent());
|
||||||
Files.createFile(self.toPath());
|
Files.createFile(self.toPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user