prutya prutya - 4 months ago 12
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?


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

Dir.glob('/*').each do |name|
  puts name