Re: Determining if a file is local
Re: Determining if a file is local
- Subject: Re: Determining if a file is local
- From: Tim Murison <email@hidden>
- Date: Fri, 26 Jun 2009 09:34:55 -0400
- Thread-topic: Determining if a file is local
>> I'm trying to determine whether a given file is mounted on a local
>> drive, or
>> a network drive.
>>
>> I've been using statfs64(), checking f_flags & MNT_LOCAL. This seems
>> to work
>> in most cases, but it turns out that if I mount a dmg from a network
>> drive,
>> f_flags says it is local.
>>
>> Does anyone know of a way to determine if a file inside a mounted
>> dmg is
>> ultimately local or remote?
>
> Recursively ascend the mount list until you hit / or a network drive.
I'm not sure I understand what you mean.
The type of thing that I'm stymied by is (from mount):
/dev/disk2s2 on /Volumes/installer.pkg (hfs, local, nodev, nosuid,
read-only, noowners, mounted by timm)
This is what mount shows when I mount a dmg from the network containing
installer.pkg. If I look at installer.pkg or any of the files inside it and
follow the mount list up, I'll hit "/Volumes/installer.pkg". I haven't found
anyway to determine where this was mounted from, short of calling "hdiutil
info".
Thanks,
-Tim
***********************************************************************
This e-mail and its attachments are confidential, legally privileged, may be subject to copyright and sent solely for the attention of the addressee(s).
Any unauthorized use or disclosure is prohibited. Statements and opinions expressed in this e-mail may not represent those of Radialpoint.
Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses
destinataires. Il est interdit de l'utiliser ou de le divulguer sans autorisation. Les opinions exprimées dans le présent courriel peuvent diverger de celles de Radialpoint.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden