Availabe diskspace

JB sundown at pacifier.com
Wed May 11 11:34:41 EDT 2016


If you want to ge the available diskspace
you can use the following function.

on mouseUp
   answer info "Show diskspace" with "GB" or "MB" or "KB"
   put it into theUnits
   get humanReadableDiskSpace (theUnits)
   ask info "Availabe diskspace" with it
end mouseUp

function humanReadableDiskSpace theUnits
   beep
   set the caseSensitive to false
   switch char 1 of theUnits
      case "k"
         return the diskSpace div 1024 & " kb"
         break
      case "m"
         return the diskSpace div (1024^2) & " mb"
         break
      case "g"
         return the diskSpace div (1024^3) & " gb"
         break
      default
         return the diskSpace
         break
   end switch
end humanReadableDiskSpace theUnits


What is the proper way to get the diskspace
from a external drive?

JB




More information about the Use-livecode mailing list