Hi,
I checked the file size attributes available with Xojo and MBS and got this for a little example file:
PhysicalFileDataLengthMBS: 1294
LogicalFileDataLengthMBS: 1294
Length: 1294
PhysicalFileResLengthMBS: 0
PhysicalFileTotalLengthMBS: 1294
What I need is the size on disk. Any idea how can I get the storage size on disk or even better the bucket size of the file system?
Thanks a lot in advance!
What is a bucket (in this context) ?
You do not disclose the unit value of “1294”.
You said file, but… any file size of xojo_binary_project.
At last, you do not disclose the running OS.
Running OS is win 10.
File is a text file with content size 1294bytes and file storage size of 4096bytes.
Bucket size is the read size at once per file read method.
I want to get the 4096bytes.
I know the storage file size from file system tool and need this by program.
Thanks a lot for Your hints!
Oh, I See we didn’t do Windows for PhysicalFileTotalLengthMBS to report physical length.
It should be in block sizes, e.g. multiplies of 512, 1024 or 4096 depending on disk.
OK.
You are asking for “Logical” and “Physical File” sizes.
The first one is the amount of Bytes the file is.
The later is the number of “blocks” needed by the mass storage to store that; usually, a HDD or an SSD.
That Block vary depending on the HDD size.
How do you get that value ?
I do not know. This is a hard disk specific property.
BUT: this varies from 1000 Bytes (recent MacOS) to 1024 (Windows and old Mac OS).
The logical value of a file have very low signification, and I know only one application that use it to fill the saved file to be “Block Aligned” (and I do not know why).
I am sorry, I do not have the knowledge nor know where to search to get it.
Maybe some people here can give the answer.
Ok, solution is not urgently needed.
I will use the size I see in file system.