flash - FLEX: getting a folder size -
i'm triying folder size doing:
var folderfile:file = new file("file:///somepath/folder"); var foldersize: folderfile.size;
but gives me value of 0, how can folder size? there anyway this?
tranks
no, there's no way automagically. getting size of directory complex , potentially painfully slow operation. there 10s of thousands of files in directory, or directory located on (slow?) network, not mention tape storage , similar scenarios.
the file systems don't store directory size information, , way know calculate file-by-file, there's no quick/easy shortcut. so, have rely on solution posted above, and, yes, going slow.
Comments
Post a Comment