1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-11 05:48:01 -05:00

* added File.diskSize that works even for paths that don't exist

This commit is contained in:
Reinhard Pointner 2013-01-29 08:54:50 +00:00
parent 5695b9b84f
commit 5683b85d4b

View File

@ -16,6 +16,7 @@ File.metaClass.getAt = { Range range -> listPath(delegate).collect{ replacePathS
File.metaClass.getAt = { int index -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(index) }
File.metaClass.getRoot = { listPath(delegate)[0] }
File.metaClass.listPath = { listPath(delegate) }
File.metaClass.getDiskSpace = { listPath(delegate).reverse().find{ it.exists() }.usableSpace }
/**