You may not yey have seen that there is a function in the MDINFO toolkit that does that calculation for youmartyn_hill wrote: Fri Feb 07, 2025 6:45 pm <>
Whilst bytes-free is arguably more human readable (say, in a formatted DIR listing), as far as determining whether or not your next file will 'fit' (not withstanding the potential growth in the directory), the sector/allocation unit free measure is actually more meaningful from a.prigramatic perspective.
<>
Code: Select all
usize = MDFSIZE(<device>, fsize)
Returns the size taken up by a file of size fsize on a given medium, in bytes.
The reason I changed from returning the size in allocation units (or was is sectors? I dont recall) was that I was always calculating the result in bytes in the end. Perhaps this was a mistake. It should be simple enough to do something about it in a future version.
It might be interesting to figure out how to convert a 64 bit unsigned integer to QL floating point.. or perhaps not. Does anyone have any ideas on that?
