method parts
1 | class Version |
1.1 | (Version) method parts |
2 | class IO::Path |
2.1 | (IO::Path) method parts |
Documentation for method parts
assembled from the following types:
class Version
From Version
(Version) method parts
method parts(Version: --> List)
Returns the list of parts that make up this Version
object
my = v1.0.1;my = v1.0.1+;say .parts; # OUTPUT: «(1 0 1)»say .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.
class IO::Path
From IO::Path
(IO::Path) method parts
Defined as:
method parts(IO::Path: --> Map)
Returns a Map with the keys volume
, dirname
, basename
whose values are the same as available via methods .volume
, .dirname
, and .basename
respectively.
say IO::Path::Win32.new("C:/rakudo/perl6.bat").parts.perl;# OUTPUT: «Map.new((:basename("perl6.bat"),:dirname("/rakudo"),:volume("C:")))»