> -----Original Message-----
> From: Dave Burt [mailto:dave / burt.id.au] 
> Sent: Friday, May 19, 2006 10:13 AM
> To: ruby-talk ML
> Subject: Re: Disk Free Space (Re: Who Wants to Be a Scripting Guy?)
> 
> 
> Alex Young wrote:
> > Dave Burt wrote:
> >> It's a good question.
> > I'm not sure about that.  Unless I'm very much mistaken, 
> the problem 
> > with the script is that Windows has a nasty reaction to being asked 
> > the free space available on a CD drive when there's no CD in it.  
> > Blech.  It makes the drive 'partially available' - some 
> things work, 
> > others don't.  If I'm right about that, then what's needed 
> is a way to 
> > find out which drives *can* respond before asking them to do so.
> 
> You are right, and the answer to this simple problem is to 
> check the result of objDrive's IsReady method, but I was 
> talking about the question behind the question: can we 
> determine disk free space in Ruby?
> 
> > On unices, I think this does the trick:
> > 
> >   $ df -h `mount | grep '^/dev' | cut -f 3 -d ' '`
> > 
> > Works on Linux and OS X, certainly - I don't have any other BSDs to 
> > check.
> 
> As I said, I think it would be very handy to have a 
> cross-platform way of checking disk free space from Ruby.

Oof.  It looks like Mike Hall's filesystem package is gone from the RAA,
and I can no longer get to his home page.

Fortunately, I have a copy laying around somewhere.  Unless someone can
find a link for me I'll probably take Mike's code and repackage it as
sys-filesystem at some point.

Regards,

Dan




This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.