{"identifier":55302,"topic":"Functions","name":"diskSpace","text":"<code><pre>the diskSpace [of disk <i>diskName<\/i>]\n<\/pre><\/code> 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 <i><code>diskName <\/i><\/code>(assuming <i><code>diskName <\/i><\/code>is a mounted volume). <br>\n","related":{"32809":null,"72105":"freeSize","83131":"size"},"examples":"if (the diskSpace div 1024) < 5000 then\n   answer \"Your disk is getting full.\"  \nend if\n\nif diskSpace of disk \"Outside\" > size of this stack then do fld 5 \n\nget the diskSpace of disk \"Major Projects\"","demo":"on reportDiskSpace\n   set the numberFormat to \"0.0\"\n   answer \"The amount of space left on the disk named\" && diskName() && \u00ac\n   \"is\" && the diskSpace \/ 1024000 && \"megabytes.\"\n end reportDiskSpace\n <br><br>\n\n function diskName longStackName\n   if longStackName is empty\n   then put the long name of this stack into longStackName\n   delete char 1 to 7 of longStackName -- remove \u201cstack \"\u201d\n   return char 1 to offset(\":\",longStackName) - 1 of longStackName\n end diskName\n ","debug":{"9":["the diskSpace [of di"]}}