Re: Using statfs to check a remote file
"T. Alex Chen" <firstname.lastname@example.org> writes:
> How do I determine if a file is a remote mounted file from statfs()
> call, i.e. which member of the 'struct statfs' contains information to
> indicate the file is NOT a local file?
This is not a very well-defined question, so the answer in general is "you
can't know that." Consider iSCSI, a VM that uses NFS as a backing file
You can use the f_type attribute to struct statfs to look for the specific
file systems you're interested in, but that's about as good as you can do.
(Note that the list in the man page is not complete.)
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>