DIRECTORY BYTES
HELLO
How to find how many bytes are there
in a directory?
I DON't want to use list() ,to find each file in directory
and using lengh() in for loop and then adding
all.
Problem is: I want to find how many files are there
in all directory whose size is ,say greater than
1000 bytes.
So before searching for for a directory,
I want to know size of directory before
so that I can decide weather to search
that directoryor not.
Thanks
Pathreading
I use a recursive method to parse the complete file srtructure under a 'target' directory.
This may be long depending on the number of files, but this the only way I found...
What I did is to store the method into a Thread, and call notify() when a new directory is processed. This way, another component (let'say a 'properties' dialog) may update its internal values each time the notify is catched.
I use this logic eitherto get the file size and file number
Maybe native method will be more accurate.
Also, have a look at the new IOAPI of jdk1.4...
vincent