txt: ## path.md
  path
  
  Combined from primary sources listed below.
  
  # [In IO::Handle](#___top "go to top of document")[§](#(IO::Handle)_method_path "direct link")
  
  See primary documentation
  [in context](/type/IO/Handle#method_path)
  for **method path**.
  
  ```raku
  method path(IO::Handle:D:)
  ```
  
  For a handle opened on a file this returns the [`IO::Path`](/type/IO/Path) that represents the file. For the standard I/O handles [`$*IN`](/language/variables#index-entry-%24%2AIN), [`$*OUT`](/language/variables#index-entry-%24%2AOUT), and [`$*ERR`](/language/variables#index-entry-%24%2AERR) it returns an [`IO::Special`](/type/IO/Special) object.
  
  # [In X::IO::Unlink](#___top "go to top of document")[§](#(X::IO::Unlink)_method_path "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Unlink#method_path)
  for **method path**.
  
  Returns the path that [unlink](/routine/unlink) failed to delete.
  
  # [In Proc::Async](#___top "go to top of document")[§](#(Proc::Async)_method_path "direct link")
  
  See primary documentation
  [in context](/type/Proc/Async#method_path)
  for **method path**.
  
  ```raku
  method path(Proc::Async:D:)
  ```
  
  **Deprecated as of v6.d**. Use [command](/routine/command) instead.
  
  Returns the name and/or path of the external program that was passed to the `new` method as first argument.
  
  # [In IO::Notification::Change](#___top "go to top of document")[§](#(IO::Notification::Change)_method_path "direct link")
  
  See primary documentation
  [in context](/type/IO/Notification/Change#method_path)
  for **method path**.
  
  Returns the path of the file that's being watched.
  
  # [In IO::Spec::Unix](#___top "go to top of document")[§](#(IO::Spec::Unix)_method_path "direct link")
  
  See primary documentation
  [in context](/type/IO/Spec/Unix#method_path)
  for **method path**.
  
  ```raku
  method path(--> Seq:D)
  ```
  
  Splits the value of `%*ENV<PATH>` on colons (`":"`), replaces empty parts with `"."`, and returns a [`Seq`](/type/Seq) with each of the resultant parts. Returns an empty [`Seq`](/type/Seq) if `%*ENV<PATH>` is not set or is an empty string.
  
  ```raku
  %*ENV<PATH> = 'foo:bar/ber::foo:';
  IO::Spec::Unix.path.raku.say;
  # OUTPUT: «("foo", "bar/ber", ".", "foo", ".").Seq␤»
  ```
  
  # [In X::IO::Rmdir](#___top "go to top of document")[§](#(X::IO::Rmdir)_method_path "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Rmdir#method_path)
  for **method path**.
  
  Returns the path [rmdir](/routine/rmdir) failed to remove
  
  # [In X::IO::Dir](#___top "go to top of document")[§](#(X::IO::Dir)_method_path "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Dir#method_path)
  for **method path**.
  
  Returns the path that [dir](/routine/dir) failed to read.
  
  # [In IO::Pipe](#___top "go to top of document")[§](#(IO::Pipe)_method_path "direct link")
  
  See primary documentation
  [in context](/type/IO/Pipe#method_path)
  for **method path**.
  
  ```raku
  method path(IO::Pipe: --> IO::Path:U)
  ```
  
  Returns an [`IO::Path`](/type/IO/Path) type object.
  
  # [In IO::CatHandle](#___top "go to top of document")[§](#(IO::CatHandle)_method_path "direct link")
  
  See primary documentation
  [in context](/type/IO/CatHandle#method_path)
  for **method path**.
  
  ```raku
  method path(IO::CatHandle:D:)
  ```
  
  Returns the value of [`.path` attribute](/type/IO/Handle#method_path) of the currently active source handle, or [`Nil`](/type/Nil) if the [source handle queue has been exhausted](/type/IO/CatHandle#method_next-handle). 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.
  
  ```raku
  (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 X::IO::DoesNotExist](#___top "go to top of document")[§](#(X::IO::DoesNotExist)_method_path "direct link")
  
  See primary documentation
  [in context](/type/X/IO/DoesNotExist#method_path)
  for **method path**.
  
  Returns the path that was passed to the failed call.
  
  # [In Cool](#___top "go to top of document")[§](#(Cool)_method_path "direct link")
  
  See primary documentation
  [in context](/type/Cool#method_path)
  for **method path**.
  
  ```raku
  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`](/type/IO/Path) object. Use the [`.IO method`](/routine/IO) instead.
  
  # [In X::IO::Chdir](#___top "go to top of document")[§](#(X::IO::Chdir)_method_path "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Chdir#method_path)
  for **method path**.
  
  Returns the path that was passed to the failed `chdir` call.
  
  # [In X::IO::Mkdir](#___top "go to top of document")[§](#(X::IO::Mkdir)_method_path "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Mkdir#method_path)
  for **method path**.
  
  Returns the path that the [mkdir](/routine/mkdir) operation failed to create.
  
  # [In IO::Spec::Win32](#___top "go to top of document")[§](#(IO::Spec::Win32)_method_path "direct link")
  
  See primary documentation
  [in context](/type/IO/Spec/Win32#method_path)
  for **method path**.
  
  ```raku
  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`](/type/Seq) with each of the resultant parts, always adding element `"."` to the head. Removes all double quotes (`"`) it finds.
  
  ```raku
  %*ENV<PATH> = 'foo;"bar"/"ber"';
  IO::Spec::Win32.path.raku.say; # OUTPUT: «(".", "foo", "bar/ber").Seq␤»
  ```
  