Now, think about what you're asking Windows to do. Every time you change the allocation for a file, you want it to update that file's header, plus something in the directory the file resides in. Not only that, but you want this to work recursively so you need to update something in each directory on up to the root directory of the drive. That's an awful lot to do and a lot of disk I/O just to add a couple of blocks to a file.
When you ask for properties of a drive and it shows you the usage, that's for the drive as a whole. Windows does track that information. But if you were to click on 'Program Files', for example, you should notice that Windows goes and does exactly what you're trying to do with File::Find. The usage numbers don't come up immediately. You'll hear a lot of disk I/O going on and the numbers will gradually increment until it has finished scanning the heirarchy.
In reply to Re: Dirsize using Win32 API call?
by pfaut
in thread Dirsize using Win32 API call?
by Ritter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |