Flowdock
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
5 thanks