* added File.diskSize that works even for paths that don't exist
This commit is contained in:
parent
5695b9b84f
commit
5683b85d4b
|
@ -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.getAt = { int index -> listPath(delegate).collect{ replacePathSeparators(getName(it)).trim() }.getAt(index) }
|
||||||
File.metaClass.getRoot = { listPath(delegate)[0] }
|
File.metaClass.getRoot = { listPath(delegate)[0] }
|
||||||
File.metaClass.listPath = { listPath(delegate) }
|
File.metaClass.listPath = { listPath(delegate) }
|
||||||
|
File.metaClass.getDiskSpace = { listPath(delegate).reverse().find{ it.exists() }.usableSpace }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue