Availabe diskspace

JB sundown at pacifier.com
Wed May 11 12:08:57 EDT 2016


Thank you very much.
I looked and missed it.

JB


> On May 11, 2016, at 8:59 AM, Mike Bonner <bonnmike at gmail.com> wrote:
> 
> From the dictionary: Returns the amount of free space on the disk that
> holds the defaultFolder.
> 
> So, set the defaultfolder to the root (or a folder) on the drive where you
> want to get the diskspace.
> 
> On Wed, May 11, 2016 at 9:34 AM, JB <sundown at pacifier.com> wrote:
> 
>> 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
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the Use-livecode mailing list