parts
ErrorsCollection

parts

Synthesised documentation from type/IO/Path type/Version

From type/IO/Path

See Original text in context

method parts(IO::Path:D:)

Returns a IO::Path::Parts for the invocant.

say IO::Path::Win32.new("C:/rakudo/raku.bat").parts.raku;
# OUTPUT: «IO::Path::Parts.new("C:","/rakudo","raku.bat")␤»

Note: Before Rakudo version 2020.06 a Map was returned, with the keys volume, dirname, basename whose values were the respective invocant parts.

From type/Version

See Original text in context

method parts(Version:D: --> List:D)

Returns the list of parts that make up this Version object

my $v1 = v1.0.1;
my $v2 = v1.0.1+;
say $v1.parts;                                    # OUTPUT: «(1 0 1)␤» 
say $v2.parts;                                    # OUTPUT: «(1 0 1)␤»

The + suffix is not considered a part of the Version object, and thus not returned by this method, as shown above in the $v2 variable.