txt: ## cygwin.md
  class IO::Spec::Cygwin
  
  Platform specific operations on file and directory paths for Cygwin
  
  ```raku
  class IO::Spec::Cygwin is IO::Spec::Unix { }
  ```
  
  An object of this type is available via the variable `$*SPEC` if the Raku interpreter is running on `Cygwin`.
  
  About this class and its related classes also see [`IO::Spec`](/type/IO/Spec).
  
  # [Methods](#class_IO::Spec::Cygwin "go to top of document")[§](#Methods "direct link")
  
  ## [method abs2rel](#class_IO::Spec::Cygwin "go to top of document")[§](#method_abs2rel "direct link")
  
  ```raku
  method abs2rel(IO::Path:D $path, IO::Path:D $base = $*CWD --> Str:D)
  ```
  
  Returns a string that represents `$path`, but relative to `$base` path. Both `$path` and `$base` may be relative paths. `$base` defaults to `$*CWD`. Uses [`IO::Spec::Win32`](/type/IO/Spec/Win32)'s semantics.
  
  ## [method canonpath](#class_IO::Spec::Cygwin "go to top of document")[§](#method_canonpath "direct link")
  
  ```raku
  method canonpath(Str() $path, :$parent --> Str:D)
  ```
  
  Returns a string that is a canonical representation of `$path`. If `:$parent` is set to true, will also clean up references to parent directories. **NOTE:** the routine does not access the filesystem.
  
  ```raku
  IO::Spec::Cygwin.canonpath(｢C:\foo\\..\bar\..\ber｣).say;
  # OUTPUT: «C:/foo/../bar/../ber␤»
  
  IO::Spec::Cygwin.canonpath("foo///./../bar/../ber").say;
  # OUTPUT: «foo/../bar/../ber␤»
  
  IO::Spec::Cygwin.canonpath("foo///./../bar/../ber", :parent).say;
  # OUTPUT: «ber␤»
  ```
  
  ## [method catdir](#class_IO::Spec::Cygwin "go to top of document")[§](#method_catdir "direct link")
  
  ```raku
  method catdir (*@parts --> Str:D)
  ```
  
  Concatenates multiple path fragments and returns the canonical representation of the resultant path as a string. The `@parts` are [`Str`](/type/Str) objects and are allowed to contain path separators.
  
  ```raku
  IO::Spec::Cygwin.catdir(<foo/bar ber raku>).say;
  # OUTPUT: «foo/bar/ber/raku␤»
  ```
  
  ## [method catpath](#class_IO::Spec::Cygwin "go to top of document")[§](#method_catpath "direct link")
  
  ```raku
  method catpath (Str:D $volume, Str:D $dir, Str:D $file --> Str:D)
  ```
  
  Same as [`IO::Spec::Win32.catpath`](/type/IO/Spec/Win32#method_catpath), except will also change all backslashes to slashes at the end:
  
  ```raku
  IO::Spec::Cygwin.catpath('C:', '/some/dir', 'foo.txt').say;
  # OUTPUT: «C:/some/dir/foo.txt␤»
  
  IO::Spec::Cygwin.catpath('C:', '/some/dir', '').say;
  # OUTPUT: «C:/some/dir␤»
  
  IO::Spec::Cygwin.catpath('', '/some/dir', 'foo.txt').say;
  # OUTPUT: «/some/dir/foo.txt␤»
  
  IO::Spec::Cygwin.catpath('E:', '', 'foo.txt').say;
  # OUTPUT: «E:foo.txt␤»
  ```
  
  ## [method is-absolute](#class_IO::Spec::Cygwin "go to top of document")[§](#method_is-absolute "direct link")
  
  ```raku
  method is-absolute(Str:D $path --> Bool:D)
  ```
  
  Returns `True` if the `$path` starts with a slash (`"/"`) or backslash (`"\"`), even if they have combining character on them, optionally preceded by a volume:
  
  ```raku
  say IO::Spec::Cygwin.is-absolute: "/foo";        # OUTPUT: «True␤»
  say IO::Spec::Cygwin.is-absolute: "/\x[308]foo"; # OUTPUT: «True␤»
  say IO::Spec::Cygwin.is-absolute: ｢C:\foo｣;      # OUTPUT: «True␤»
  say IO::Spec::Cygwin.is-absolute: "bar";         # OUTPUT: «False␤»
  ```
  
  ## [method join](#class_IO::Spec::Cygwin "go to top of document")[§](#method_join "direct link")
  
  ```raku
  method join(|c)
  ```
  
  Same as [`IO::Spec::Win32.join`](/type/IO/Spec/Win32#method_join), except replaces backslashes with slashes in the final result.
  
  ## [method rel2abs](#class_IO::Spec::Cygwin "go to top of document")[§](#method_rel2abs "direct link")
  
  ```raku
  method rel2abs(|c --> List:D)
  ```
  
  Same as [`IO::Spec::Win32.rel2abs`](/type/IO/Spec/Win32#method_rel2abs), except replaces backslashes with slashes in the final result.
  
  ## [method split](#class_IO::Spec::Cygwin "go to top of document")[§](#method_split "direct link")
  
  ```raku
  method split(IO::Spec::Cygwin: Cool:D $path)
  ```
  
  Same as [`IO::Spec::Win32.split`](/type/IO/Spec/Win32#method_split), except it replaces backslashes with slashes in all the values of the final result.
  
  ## [method splitpath](#class_IO::Spec::Cygwin "go to top of document")[§](#method_splitpath "direct link")
  
  ```raku
  method splitpath(|c --> List:D)
  ```
  
  Same as [`IO::Spec::Win32.splitpath`](/type/IO/Spec/Win32#method_splitpath), except replaces backslashes with slashes in all the values of the final result.
  
  ## [method tmpdir](#class_IO::Spec::Cygwin "go to top of document")[§](#method_tmpdir "direct link")
  
  ```raku
  method tmpdir(--> IO::Path:D)
  ```
  
  Attempts to locate a system's temporary directory by checking several typical directories and environment variables. Uses current directory if no suitable directories are found.
  