Click to See Complete Forum and Search --> : Filedate-/time and Filesizes -->Got a few questions


AlionSolutions
February 18th, 2003, 06:24 AM
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

AlionSolutions
February 18th, 2003, 08:33 AM
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