get a list of mounted filesystems under MacOSX

garabik-news-2005-05 at kassiopeia.juls.savba.sk garabik-news-2005-05 at kassiopeia.juls.savba.sk
Tue Aug 16 02:49:50 EDT 2005


rafi <rafi at free.fr> wrote:
> garabik-news-2005-05 at kassiopeia.juls.savba.sk wrote:
>> Hi all,
>> I am trying to port my (linux) program to MacOSX, and I need to get a
>> list of mounted filesystems. Under linux, it was easy, I was parsing
>> /etc/mtab (or /proc/mounts), this works also on some other unices.
>> But I have no idea how to do it on MacOSX, apart from calling "mount" as
>> an external program and parsing the output - but I prefer "cleaner"
>> solutions. Is there one?
> 
> why not looking at the content of the /Volumes folder?

because the filesystem could be mounted elsewhere (in fact, the Mac Mini
I have across the table has a big network storage nfs-mounted on /data)


-- 
 -----------------------------------------------------------
| Radovan Garabík http://kassiopeia.juls.savba.sk/~garabik/ |
| __..--^^^--..__    garabik @ kassiopeia.juls.savba.sk     |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!



More information about the Python-list mailing list