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.