21 Jan
2007
21 Jan
'07
5:46 p.m.
Daniel Wyatt wrote:
Its not too pretty but ignore that please. It works for the most part. It gives perfect results for nearly all directories. One exception i've noticed on my system is "C:\Program Files". It gives me "419.15 MiB" but it should be giving me something more like "8.40 GiB". I figure an unsigned long is large enough, isn't it?
No, unsigned long is just 32 bits, it is not enough.
Do i need to use an unsigned long long or is there something else wrong here???
Yes, you should use a 64 bit integer. PS: Boost.Filesystem has a recursive_directory_iterator, it is very good for such directory iteration job. cg