prutya prutya - 1 year ago 64
Ruby Question

Is there a way to get File System root path in ruby?

I am making an education website which should display host file system.
Is there a way to get Operating System (or File System, I don't know exactly how it's called) root path?

Answer Source

If you are talking about the server File System, yes:

Dir.glob('/*').each do |name|
  puts name
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download