[Gambas-user] File stat question

M0E Lnx m0e.lnx at ...626...
Thu May 8 20:27:32 CEST 2008


I'm trying to figure out a way to calculate file sizes.
I can use stat(sPathToFile).size to get the size and go from there.
But the problem I'm havin here is that whenever I'm dealing with a
directory, it always returns a size of 4K no matter what's in the
directory

Is there any way to manipulate this to make it calculate the sizes recursively?
Or would I be better off using something like the du command via a
shell process?
The second option would be very inefficient, as this process would
have to run hundreds maybe thousands of times.

Please advise.




More information about the User mailing list