On Sat, Feb 21, 2015 at 11:01:06PM +0100, Thomas Tempelmann wrote: > (I realize this isn't really the best place to ask this question as it's > rather a user-level API question, not a filesys designer's question, but I > give it a try anyway because I didn't have luck finding answers elsewhere > so far.) > > My question is: How can a user level app determine whether an automounted > NFS share is currently accessible or not?
You can use getfsstat(..., ..., MNT_NOWAIT) to get the current list of mounted filesystems. (Note: this will include things you may not consider a "filesystem" or "volume". For example, synthetic autofs directories (/net, /home, /Network/Servers).) However, whether a remote filesystem is "accessible" or not is never certain. Even if you *just* accessed files on it, a millisecond later that server may become inaccessible. Network file systems attempt to make remote resources look like they are local. Unfortunately, networks often do not like to cooperate. HTH --macko _______________________________________________ Do not post admin requests to the list. They will be ignored. Filesystem-dev mailing list (Filesystem-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com