method path
Documentation for method path
assembled from the following types:
class Cool
From Cool
(Cool) method path
Defined as:
method path()
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.
class Proc::Async
From Proc::Async
(Proc::Async) method path
method path(Proc::Async:)
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.
class IO::CatHandle
From IO::CatHandle
(IO::CatHandle) method path
Defined as:
method path(IO::CatHandle:)
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 = 'foo'.IO).spurt: "A\nB\nC";(my = 'bar'.IO).spurt: "D\nE";my ;my = IO::CatHandle.new: :on-switch, , ;say ": $_" for .lines;# OUTPUT:# foo:1 A# foo:2 B# foo:3 C# bar:1 D# bar:2 E
class IO::Pipe
From IO::Pipe
(IO::Pipe) method path
Defined as:
method path(IO::Pipe: --> IO::Path)
Returns an IO::Path type object.
class IO::Handle
From IO::Handle
(IO::Handle) method path
Defined as:
method path(IO::Handle:)
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.
class X::IO::Rmdir
From X::IO::Rmdir
(X::IO::Rmdir) method path
Returns the path rmdir failed to remove
class X::IO::Dir
From X::IO::Dir
(X::IO::Dir) method path
Returns the path that dir failed to read.
class X::IO::Mkdir
From X::IO::Mkdir
(X::IO::Mkdir) method path
Returns the path that the mkdir operation failed to create.
class X::IO::Unlink
From X::IO::Unlink
(X::IO::Unlink) method path
Returns the path that unlink failed to delete.
class X::IO::DoesNotExist
From X::IO::DoesNotExist
(X::IO::DoesNotExist) method path
Returns the path that was passed to the failed call.
class X::IO::Chdir
From X::IO::Chdir
(X::IO::Chdir) method path
Returns the path that was passed to the failed chdir
call.
class IO::Spec::Unix
From IO::Spec::Unix
(IO::Spec::Unix) method path
Defined as:
method path(--> Seq)
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.
<PATH> = 'foo:bar/ber::foo:';IO::Spec::Unix.path.perl.say;# OUTPUT: «("foo", "bar/ber", ".", "foo", ".").Seq»
class IO::Spec::Win32
From IO::Spec::Win32
(IO::Spec::Win32) method path
Defined as:
method path(--> Seq)
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.
<PATH> = 'foo;"bar"/"ber"';IO::Spec::Win32.path.perl.say; # OUTPUT: «(".", "foo", "bar/ber").Seq»