method parent

Documentation for method parent, assembled from the following types:

class IO::Path

From IO::Path

(IO::Path) method parent

Defined as:

method parent(IO::Path:D: --> IO::Path:D)

Returns the parent path of the invocant. Note that no file system access is made, so the returned parent is physical and not the logical parent of symlinked directories.

'/etc/foo'.IO.parent.say# OUTPUT: «"/etc".IO␤» 
'/etc/..' .IO.parent.say# OUTPUT: «"/etc".IO␤» 
'/etc/../'.IO.parent.say# OUTPUT: «"/etc".IO␤» 
'./'      .IO.parent.say# OUTPUT: «"..".IO␤» 
'foo'     .IO.parent.say# OUTPUT: «".".IO␤» 
'/'       .IO.parent.say# OUTPUT: «"/".IO␤»'C:/').parent.say# OUTPUT: «"C:/".IO␤» 

class X::Inheritance::Unsupported

From X::Inheritance::Unsupported

(X::Inheritance::Unsupported) method parent

The type object that the child tried to inherit from.