method dirname

Documentation for method dirname, assembled from the following types:

class IO::Path

From IO::Path

(IO::Path) method dirname

Defined as:

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::Win32.new("C:/home/camelia").dirname;  # OUTPUT: «/home␤» 
say IO::Path.new("/home").dirname;                   # OUTPUT: «/␤»