Folder name : dirname « File Directory « Ruby






Folder name


full = '/home/matz/bin/ruby.exe'
dir=File.dirname(full)       # => '/home/matz/bin': no / at end

 

Related examples in the same category