madBasic SizeTostr ??

delphi package - madRes, madTools, madStrings, ...
Post Reply
IIp
Posts: 5
Joined: Fri Mar 25, 2005 10:06 am

madBasic SizeTostr ??

Post by IIp »

Hi madshi 1 little question for you :
when you calculate the return value of the funcion SizeTostr wich type of file system use :
NTFS,FAT,FAT32,CDFS,UTF ????

because the result size maybe different for each type of fs
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I'm not sure what you mean. 1024 Bytes are always 1 KB. And 1024 KBs are always 1 MB. And that's what SizeToStr calculates. How can that depend on the filesystem being used?
IIp
Posts: 5
Joined: Fri Mar 25, 2005 10:06 am

Post by IIp »

suppose that i have 1800 byte.
in cd fs i need 2 kb for store this infomation
in NTFS i need 4 kb for store the same information

because the cluste size is different between fs
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ah ok, well "SizeToStr" doesn't care about that. It only converts a specific number of bytes value to a readable string. If you want to calculate how much space a specific file consumes on a specific file system, then that's also a useful information, but this is outside of the scope of "SizeToStr".
Post Reply