just the local filename : basename « File Directory « Ruby






just the local filename


full = '/home/matz/bin/ruby.exe'

puts file=File.basename(full)     # => 'ruby.exe': just the local filename

 

Related examples in the same category

1.base name with extension stripped