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.


method abs2rel§

method abs2rel(IO::Path:D $pathIO::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's semantics.

method canonpath§

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.

# OUTPUT: «C:/foo/../bar/../ber␤» 
# OUTPUT: «foo/../bar/../ber␤» 
# OUTPUT: «ber␤»

method catdir§

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 objects and are allowed to contain path separators.

IO::Spec::Cygwin.catdir(<foo/bar ber raku>).say;
# OUTPUT: «foo/bar/ber/raku␤»

method catpath§

method catpath (Str:D $volumeStr:D $dirStr:D $file --> Str:D)

Same as IO::Spec::Win32.catpath, except will also change all backslashes to slashes at the end:

# OUTPUT: «C:/some/dir/foo.txt␤» 
# OUTPUT: «C:/some/dir␤» 
# OUTPUT: «/some/dir/foo.txt␤» 
# OUTPUT: «E:foo.txt␤»

method is-absolute§

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:

say "/foo";        # OUTPUT: «True␤» 
say "/\x[308]foo"# OUTPUT: «True␤» 
say C:\foo;      # OUTPUT: «True␤» 
say "bar";         # OUTPUT: «False␤»

method join§

method join(|c)

Same as IO::Spec::Win32.join, except replaces backslashes with slashes in the final result.

method rel2abs§

method rel2abs(|c --> List:D)

Same as IO::Spec::Win32.rel2abs, except replaces backslashes with slashes in the final result.

method split§

method split(IO::Spec::Cygwin: Cool:D $path)

Same as IO::Spec::Win32.split, except it replaces backslashes with slashes in all the values of the final result.

method splitpath§

method splitpath(|c --> List:D)

Same as IO::Spec::Win32.splitpath, except replaces backslashes with slashes in all the values of the final result.

method tmpdir§

method tmpdir(--> IO::Path:D)

Attempts to locate a system's temporary directory by checking several typical directories and environmental variables. Uses current directory if no suitable directories are found.


Type relations for IO::Spec::Cygwin
raku-type-graph IO::Spec::Cygwin IO::Spec::Cygwin IO::Spec::Unix IO::Spec::Unix IO::Spec::Cygwin->IO::Spec::Unix Mu Mu Any Any Any->Mu IO::Spec IO::Spec IO::Spec->Any IO::Spec::Unix->IO::Spec

Expand chart above