1) Ram Disk: (and stuff that points there like T:) seem to give 0 bytes as free space with GetVolumeInfo() on AmigaOS. On MorphOS this doesn't happen and you get the size of the available memory as a result. This probably is a small implementation difference in operating systems itself, but could this be handled in Hollywood somehow so that you could get the real free space on AmigaOS too?
2) GetVolumeInfo seems to have some size limitation under AmigaOS versions. Maybe at 2GB? On MorphOS this isn't an issue and there you can get correct sizes even with bigger partitions. Anyway, AmigaOS versions seem to give negative etc arbitrary values.
I used this code to test on different systems:
Code: Select all
@DISPLAY {Hidden=True}
Repeat
Local vol$ = PathRequest("Select a volume")
If vol$
Local space = GetVolumeInfo(vol$, #FREESPACE)
ConsolePrint("Volume", vol$, "has", space, "bytes free space.")
Else
End
EndIf
Forever
Code: Select all
5.AmiKit:> info AK0: AK1: RAM:
Unit Size Used Free Full Errs State Type Name
AK0: 3.9G 936.6M 3.0G 23% 0 read/write SFS0 AmiKit
AK1: 99.0G 35.9G 63.1G 36% 0 read/write OFS RabbitHole
RAM: 22K 22K 0K 100% 0 read/write OFS Ram
5.AmiKit:> Ram:getvolumeinfotest.68k
Volume AK0: has -1085353472 bytes free space.
Volume AK1: has -969785344 bytes free space.
Volume RAM: has 0 bytes free space.