|
-
February 18th, 2003, 07:24 AM
#1
file and directory-sizes on disc
Dear Gurus,
this is an edit of another posting that I recycled ;o)
Ok, my first question from the old posting is answered by something I found on the web.
and I can ask my second question now much more clearly, because now I know that the physical filesize and the size on disk are NOT equal because of something called clustering.
Ok, I nearly figured out how this works, but I don't know if I am right, so I ask you:
I need to dertermine the physical filesize and the space it occupies on disk.
the first one is easy, but how to get the size on disk ? As I understood, one needs to do the following:
int sizeondisk;
int m = filesize % clustersize;
if (m > 0)
{
sizeondisk = filesize - m;
sizeondisk += clustersize;
}
else
{
sizeondisk = filesize;
}
is this right ? if not, please tell me why.
Another question is how to determine clustersize. I did't find a way to get this value.
Ok, thanks in advance
Juergen
Last edited by AlionSolutions; February 18th, 2003 at 08:45 AM.
-
February 18th, 2003, 09:33 AM
#2
problem solved
ok, this is DONE !!!
Soetimes I should have a look in VC++-programmers-domain
for those also interested:
http://www.codeguru.com/system/clustersize.shtml
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|