The path routine

Combined from primary sources listed below.

In class IO::CatHandle ( Type/IO/CatHandle )§

See primary docmentation in context for method path.

method path§

method path(IO::CatHandle:D:)

Returns the value of .path attribute of the currently active source handle, or Nil if the source handle queue has been exhausted. Basically, if your CatHandle is based on files, this is the way to get the path of the file the CatHandle is currently reading from.

(my $f1 = 'foo'.IO).spurt: "A\nB\nC";
(my $f2 = 'bar'.IO).spurt: "D\nE";

my $line;
my $cat = IO::CatHandle.new: :on-switch{ $line = 1 }, $f1, $f2;
say "{$cat.path}:{$line++} $_" for $cat.lines;
# OUTPUT:
# foo:1 A
# foo:2 B
# foo:3 C
# bar:1 D
# bar:2 E

In class X::IO::Dir ( Type/X/IO/Dir )§

See primary docmentation in context for method path.

method path§

Returns the path that dir failed to read.

In class X::IO::Unlink ( Type/X/IO/Unlink )§

See primary docmentation in context for method path.

method path§

Returns the path that unlink failed to delete.

In class X::IO::Rmdir ( Type/X/IO/Rmdir )§

See primary docmentation in context for method path.

method path§

Returns the path rmdir failed to remove

In class Proc::Async ( Type/Proc/Async )§

See primary docmentation in context for method path.

method path§

method path(Proc::Async:D:)

Deprecated as of v6.d. Use command instead.

Returns the name and/or path of the external program that was passed to the new method as first argument.

In class Distro ( Type/Distro )§

See primary docmentation in context for method path.

method path-sep§

Instance method returning the string that can be used to delimit elements in a path specification.

In class X::IO::Mkdir ( Type/X/IO/Mkdir )§

See primary docmentation in context for method path.

method path§

Returns the path that the mkdir operation failed to create.

In class IO::Pipe ( Type/IO/Pipe )§

See primary docmentation in context for method path.

method path§

method path(IO::Pipe: --> IO::Path:U)

Returns an IO::Path type object.

In class IO::Spec::Unix ( Type/IO/Spec/Unix )§

See primary docmentation in context for method path.

method path§

method path(--> Seq:D)

Splits the value of %*ENV<PATH> on colons (":"), replaces empty parts with ".", and returns a Seq with each of the resultant parts. Returns an empty Seq if %*ENV<PATH> is not set or is an empty string.

%*ENV<PATH> = 'foo:bar/ber::foo:';
IO::Spec::Unix.path.raku.say;
# OUTPUT: «("foo", "bar/ber", ".", "foo", ".").Seq␤»

In class IO::Notification::Change ( Type/IO/Notification/Change )§

See primary docmentation in context for method path.

method path§

Returns the path of the file that's being watched.

In class IO::Spec::Win32 ( Type/IO/Spec/Win32 )§

See primary docmentation in context for method path.

method path§

method path(--> Seq:D)

Splits the value of %*ENV<PATH> (or %*ENV<Path> if the former is not set) on semicolons (";") and returns a Seq with each of the resultant parts, always adding element "." to the head. Removes all double quotes (") it finds.

%*ENV<PATH> = 'foo;"bar"/"ber"';
IO::Spec::Win32.path.raku.say# OUTPUT: «(".", "foo", "bar/ber").Seq␤»

In class Cool ( Type/Cool )§

See primary docmentation in context for method path.

method path§

method path(Cool:D: --> IO::Path:D)

DEPRECATED. It's been deprecated as of the 6.d version. Will be removed in the next ones.

Stringifies the invocant and converts it to IO::Path object. Use the .IO method instead.

In class IO::Handle ( Type/IO/Handle )§

See primary docmentation in context for method path.

method path§

method path(IO::Handle:D:)

For a handle opened on a file this returns the IO::Path that represents the file. For the standard I/O handles $*IN, $*OUT, and $*ERR it returns an IO::Special object.

In class X::IO::Chdir ( Type/X/IO/Chdir )§

See primary docmentation in context for method path.

method path§

Returns the path that was passed to the failed chdir call.

In class X::IO::DoesNotExist ( Type/X/IO/DoesNotExist )§

See primary docmentation in context for method path.

method path§

Returns the path that was passed to the failed call.