Program to determine size of a directory

Hello, I need to write a program to control the size of several users' directories. Is there a way to determine it from a C++ program, or should I take another approach?
What's the operating system?
What do you mean by control? Do you plan to manipulate files, place limits on their sizes, or just monitor disk usage?

Does this help?
http://www.boost.org/doc/libs/1_42_0/libs/filesystem/doc/index.htm
Last edited on
chrisname, OS is Windows XP.

I know what I would do with a Linux box, but not in Windows, not especially when the users have named directories after themselves and are letting them grow wild.

What I mean is that I need to store the directories' size somewhere, so I can monitor which users are exceeding the limit.

Sort of like quotas, but informal. Hope I explained it better this time.
Last edited on
I recommend using moorecm's link. Here it is again:
http://www.boost.org/doc/libs/1_42_0/libs/filesystem/doc/index.htm

-Albatross
Well, on Linux you would use stat (sys/stat.h) but I'm not sure about Windows (unless you compile with Cygwin's gcc).
Topic archived. No new replies allowed.