Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Remaining Diskspace

by gumby (Scribe)
on Jun 17, 2002 at 20:50 UTC ( [id://175184]=note: print w/replies, xml ) Need Help??


in reply to Remaining Diskspace

To my knowledge, there are several modules that can handle this for you; Win32::DriveInfo is but one.

Update: I just noticed you specified platform independent, so you probably mean a Unix 'df' equivalent. There are also a couple of modules on CPAN which will provide this function.

Replies are listed 'Best First'.
Re: Re: Remaining Diskspace
by meraxes (Friar) on Jun 17, 2002 at 22:50 UTC

    I'd already found Filesys::DiskFree but it only works for *nix OS's. I was hoping for a module that could make the determination on both Win32 and MacOSX... doesn't seem to be one though. I guess there'll have to be two versions of the script.

    Disappointing but I suppose it's not too surprising. Since each OS uses different file systems I guess it'd be pretty difficult to write one module for all OS's.

    Thanks for the info though, I'm sure I'll be able to use it somewhere else in the future.

      I thought I would just note that while Filesys::Df is not portable to the Windows environment, it is highly portable between *NIX platforms, providing a better means (IMHO) by which to check available disk space (via a statvfs call) on these platforms than parsing the output of df - An example of the usage of this module and a discussion on its merits over the parsing of the output of df can be found here.

       

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://175184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-23 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found