[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Determining free disk space



Ian wrote:
> 
> > At 8:09 -0400 1999.10.11, schinder@pobox.com wrote:
> >>You could use File::Find to laboriously walk the tree and total up the
> >>size of every file it found.  But if I were you, I'd be hunting
> >>through "Inside Macintosh" and the Mac Toolbox pods with Shuck to find
> >>the call it uses to give you the total disk usage when you "command-I"
> >>a disk.  That seems to be instantaneous, even on a netatalk mounted
> >>disk on the Linux machine.  Then, if MacPerl gives you access to that
> >>routine, the problem is solved.
> >
> > If you do not find the routine in the toolbox, let us know what it is, and
> > maybe someone can code it up and supply it.
> >
> 
> Following Paul's reply, I found a routine called 'PBHGetVInfo' on the Inside
> Macintosh website which sounds like it does what I want, but I don't know
> how to call it from perl...
> 
> Do I need CodeWarrior or something to compile code that Perl can use?
> 

Instead of PBHGetVInfo, which does a lot of stuff you don't need,
you could try this from
<http://developer.apple.com/techpubs/mac/Files/Files-64.html#MARKER-2-332>.
Of course, it'll need and interface to MacPerl (see cnandor's
post in this thread).

------------
GetVInfo

You can use the GetVInfo function to get information about a
mounted volume.

FUNCTION GetVInfo (drvNum: Integer; volName: StringPtr; 
                   VAR vRefNum: Integer; 
                   VAR freeBytes: LongInt): OSErr;
-------------

Hope that helps,
Geoff

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org