diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy index fe45f156..833c637b 100644 --- a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy +++ b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy @@ -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 } /**