method

dirname

Importance_2
Ruby latest stable (v1_8_7_72) - 1 note - Class: File
dirname(p1) public

Returns all components of the filename given in file_name except the last one. The filename must be formed using forward slashes (``/’’) regardless of the separator used on the local file system.

   File.dirname("/home/gumby/work/ruby.rb")   #=> "/home/gumby/work"
Show source
Register or log in to add new notes.
April 23, 2009
1 thank