prutya prutya - 1 month ago 3x
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