Free size of different volume?

Richard Gaskin ambassador at fourthworld.com
Tue May 29 10:50:07 EDT 2007


Ken Ray wrote:

> On Mon, 28 May 2007 15:08:46 -0700, Richard Gaskin wrote: 
>> The diskSpace function returns the free space of the drive the app is 
>> running from.  I have an installer that runs from a CD, and I need to 
>> get the avialable size of the destination volume.
> 
> Actually, the docs say that it gets the free space of where the 
> defaultFolder is, so I assume if you point the defaultFolder to the 
> other drive and ask for diskSpace you'll get the right values.

Or so I had thought, but I can't seem to get that to work - here's a test:

on mouseUp
   put the defaultFolder into tDir
   set the defaultfolder to "/Volumes/util/"
   if the result is not empty then
     answer the result
     exit to top
   end if
   get the diskspace
   put it &cr& the defaultFolder
end mouseUp


When I run this I get the amount of free space on the drive the app is 
running from, even though the defaultFolder shows the path to the other 
volume as I'd expect.

If someone will verify that I'll file a bug report.

In the meantime, anyone have the shell calls handy to get this info?

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list