How can I find in ruby the type of filesystem from a given file? (pseudo code: FileSystem.type('/path/to/file')). I'm especially interested to know if the fs is networked (nfs, cifs) or on a local disk.
Thank you,
Ittay
···
--
--
Ittay Dror <ittay.dror@gmail.com>
I would just ask the system:
currently_mounted = `mount`
···
On Wed, Nov 19, 2008 at 3:32 AM, Ittay Dror <ittay.dror@gmail.com> wrote:
How can I find in ruby the type of filesystem from a given file? (pseudo
code: FileSystem.type('/path/to/file')). I'm especially interested to know
if the fs is networked (nfs, cifs) or on a local disk.
Thank you,
Ittay
--
--
Ittay Dror <ittay.dror@gmail.com>
--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."
-Greg Graffin (Bad Religion)
gem install sys-filesystem
Enjoy!
Dan
···
On Nov 19, 3:32 am, Ittay Dror <ittay.d...@gmail.com> wrote:
How can I find in ruby the type offilesystemfrom a given file? (pseudo
code:FileSystem.type('/path/to/file')). I'm especially interested to
know if the fs is networked (nfs, cifs) or on a local disk.