Finding and Changing the Current Working Directory : Dir.getwd « File Directory « Ruby
- Ruby
- File Directory
- Dir.getwd
Finding and Changing the Current Working Directory
Dir.getwd # => "/home/leonardr"
Dir.chdir("/bin")
Dir.getwd # => "/bin"
File.exists? "ls" # => true
Related examples in the same category