On Mon, Feb 04, 2013 at 09:57:04AM -0600, Reini Urban wrote: > On 02/04/2013 09:13 AM, David Cantrell wrote: > >and because you want this to work on Windows as well as Unix, you need > >to jump through all the painful hoops of making things like figuring out > >what filesystem a file is on portable. > It's more like identifying the mountpoint per path, > and then retrieving the mount options per mount. > It has almost nothing to do with $^O.
That's actually not easy to do portably. See Sys-Filesystem. Then you have to figure out what those options mean on each OS. And the mount options won't tell you whether your NFS volume is backed by something sensible like UFS or ext4, or whether the admin has done something crazy like export a FAT filesystem or re-export something from Samba. This is important if you want to know things like whether hard links are supported, or whether it is case-sensitive vs case-preserving vs case-smashing. -- David Cantrell | Reality Engineer, Ministry of Information Fashion label: n: a liferaft for personalities which lack intrinsic buoyancy