In IO::Spec::Win32§
See primary documentation in context for method splitdir.
method splitdir(Cool:D $path --> List:D)
Splits the given $path
on slashes and backslashes.
IO::Spec::Win32.splitdir('C:\foo/bar.txt').raku.say; # OUTPUT: «("C:", "foo", "bar.txt")» IO::Spec::Win32.splitdir('/foo/').raku.say; # OUTPUT: «("", "foo", "")» IO::Spec::Win32.splitdir('///').raku.say; # OUTPUT: «("", "", "", "")» IO::Spec::Win32.splitdir('./').raku.say; # OUTPUT: «(".", "")» IO::Spec::Win32.splitdir('.').raku.say; # OUTPUT: «(".",)» IO::Spec::Win32.splitdir('').raku.say; # OUTPUT: «("",)»
In IO::Spec::Unix§
See primary documentation in context for method splitdir.
method splitdir(Cool:D $path --> List:D)
Splits the given $path
on slashes.
IO::Spec::Unix.splitdir('C:\foo/bar.txt').raku.say; # OUTPUT: «("C:\\foo", "bar.txt")» IO::Spec::Unix.splitdir('/foo/').raku.say; # OUTPUT: «("", "foo", "")» IO::Spec::Unix.splitdir('///').raku.say; # OUTPUT: «("", "", "", "")» IO::Spec::Unix.splitdir('./').raku.say; # OUTPUT: «(".", "")» IO::Spec::Unix.splitdir('.').raku.say; # OUTPUT: «(".",)» IO::Spec::Unix.splitdir('').raku.say; # OUTPUT: «("",)»