Documentation for method dirname

Documentation for method dirname, assembled from the following types:

class IO::Path

From IO::Path

(IO::Path) method dirname

method dirname(IO::Path:D:)

Returns the directory name portion of the path object. That is, it returns the path excluding the volume and the base name.

say IO::Path.new("/home/camelia/myfile.p6").dirname;    # OUTPUT: «/home/camelia␤» 
say IO::Path.new("/home/camelia").dirname;              # OUTPUT: «/home␤» 
say IO::Path.new("/home").dirname;                      # OUTPUT: «/␤»