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

Re: [MacPerl] list of volumes (was UnmountVol)



Kevin Walker writes on 11 February 1998:

>(1) If I could obtain a list of noames of mounted volumes (or a list of
>everything which shows up on the desktop, including the mounted volumes),
>I'd be happy to search for the volume name via /^Audio CD [0-9]+$/, and
>then plug into the above mentioned applescript methods.  But I can't figure
>out how obtain such a list.  Is there a magic pathname I can plug into
>opendir/readdir?

Mac::Volumes() will return a list of the FSSpec's of all mounted volumes.
Run the following and you will see how it works:

    #!perl
    foreach (MacPerl::Volumes()) { print MacPerl::MakePath($_), "\n" }

The first in the list is the start-up volume. See 'macperl.pod' for more
details.

>(2) I already have (from another source) the vRefNum for the CD I want to
>unmount.

I'm sorry I haven't a clue about how you might use 'vRefNum'. But if you go
through the list returned by MacPer::Volumes() you should be able to fish
out what you want.

Alan Fry



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch