find type of filesystem (*nix/windows)

I

Ittay Dror

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
 
G

Glen Holcomb

[Note: parts of this message were removed to make it a legal post.]

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
I would just ask the system:

currently_mounted = `mount`
 
D

Daniel Berger

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
EmeliaBryc

Latest Threads

Top