1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-21 23:38:50 -05:00

Add File.getDisplaySize() extension method

This commit is contained in:
Reinhard Pointner 2019-05-20 00:28:21 +07:00
parent 9c21465e50
commit 6fb43e79b7

View File

@ -262,6 +262,10 @@ public class ScriptShellMethods {
return FileUtilities.copyAs(self, new File(destination, self.getName()));
}
public String getDisplaySize(File self) {
return FileUtilities.formatSize(self.length());
}
public static void createIfNotExists(File self) throws IOException {
if (!self.isFile()) {
// create parent folder structure if necessary & create file