Finding and Changing the Current Working Directory : Dir.getwd « File Directory « Ruby






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