Find type of filesystem (*nix/windows)


#1

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


#2

On Wed, Nov 19, 2008 at 3:32 AM, Ittay D. removed_email_address@domain.invalid
wrote:

Ittay D. removed_email_address@domain.invalid

I would just ask the system:

currently_mounted = mount


“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)


#3

On Nov 19, 3:32 am, Ittay D. removed_email_address@domain.invalid 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.

gem install sys-filesystem

Enjoy!

Dan