On Sat, Feb 02, 2013 at 01:14:44PM -0500, yary wrote: > It would be nice to have something like $OSNAME for filesystem type > discovery... Beef up Sys::Filesystem and put it in the core? Or at least > encourage its use where helpful...
That's tricky. What you're really interested in isn't the filesystem but the filesystem's capabilities. Consider, for example, NFS which ends up on a FAT filesystem has different capabilities from NFS which has an ext4 backend. And in the general case you can't tell what those capabilities are without just trying them. So, riffing off of Devel::CheckOS, you'd want an API something like this ... my $fs = Devel::CheckFS->new($filename); print "$filename is on an FS that is case sensitive\n" if($fs->supports('CaseSensitive')); 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. I'd love to see someone other than me write this code! -- David Cantrell | Pope | First Church of the Symmetrical Internet THIS IS THE LANGUAGE POLICE PUT DOWN YOUR THESAURUS STEP AWAY FROM THE CLICHE