Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
the diskSpace [of disk diskName]
Value returned: a positive integer equal to the number of bytes of free space on the disk that contains the current stack or of the disk whose name appears in diskName
(assuming diskName
is a mounted volume). if (the diskSpace div 1024) < 5000 then
answer "Your disk is getting full."
end if
if diskSpace of disk "Outside" > size of this stack then do fld 5
get the diskSpace of disk "Major Projects"
on reportDiskSpace
set the numberFormat to "0.0"
answer "The amount of space left on the disk named" && diskName() && ¬
"is" && the diskSpace / 1024000 && "megabytes."
end reportDiskSpace
function diskName longStackName
if longStackName is empty
then put the long name of this stack into longStackName
delete char 1 to 7 of longStackName -- remove “stack "”
return char 1 to offset(":",longStackName) - 1 of longStackName
end diskName
Functions
Version 0.7b1 (March 24, 2022)