Is there something similar to statfs
in Java to determine the filesystem type of a given file? More specifically I'd like to determine if a file provided by a user is on a shared or local filesystem. I'm going to use this information to determine if the application is opening several identically named files on the local filesystem of a distributed application, or one shared file.
I suppose if I can get something like "NFS", "Lustre", "EXT3", etc either as a string or an enumeration then I can program a mapping to shared/not shared. Let's assume the file exists and is readable.