# class IO::Spec::Win32

Platform specific operations on file and directory paths for Windows

## method join

Defined as:

Similar to catpath, takes two path fragments and concatenates them, adding or removing a path separator, if necessary, except it will return just $file if both $dir and $file are string '/' or if $dir is the string '.'. The first argument is ignored (it exists to maintain consistent interface with other IO::Spec types for systems that have volumes).

## method path

Defined as:

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.

Defined as:

## method splitpath

Defined as:

Splits the given $path into a list of 3 strings: volume, dirname, and file. The volume is always an empty string, returned for API compatibility with other IO::Spec types. If :$nofile named argument is set to True, the content of the file string is undefined and should be ignored; this is a means to get a performance boost, as implementations may use faster code path when file is not needed.

## method tmpdir

Defined as:

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.

# Routines supplied by class IO::Spec::Unix

IO::Spec::Win32 inherits from class IO::Spec::Unix, which provides the following routines:

## (IO::Spec::Unix) method abs2rel

Defined as:

Returns a string that represents $path, but relative to $base path. Both $path and $base may be relative paths. $base defaults to $*CWD.

## (IO::Spec::Unix) method basename

Defined as:

Takes a path as a string and returns a possibly-empty portion after the last slash:

## (IO::Spec::Unix) method canonpath

Defined as:

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, so no symlinks are followed.

## (IO::Spec::Unix) method catdir

Defined as:

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::Unix) method catfile

Alias for catdir.

## (IO::Spec::Unix) method catpath

Defined as:

Takes two path fragments and concatenates them, adding or removing a path separator, if necessary. The first argument is ignored (it exists to maintain consistent interface with other IO::Spec types for systems that have volumes).

## (IO::Spec::Unix) method curdir

Defined as:

Returns a string representing the current directory:

## (IO::Spec::Unix) method curupdir

Defined as:

Returns a Block taking an argument. This block returns True if its argument is neither the string representing the current directory nor the string representing the directory one up from the current one. It returns False otherwise. This block is intended to be used with smartmatching.

Neither foo nor bar are equal to the representation of the current or parent directory, that is why they are returned by grep.

Note: Before Rakudo version 2020.06 a none Junction was returned instead of a Block.

## (IO::Spec::Unix) method devnull

Defined as:

Returns the string "/dev/null" representing the "Null device":

## (IO::Spec::Unix) method dir-sep

Defined as:

Returns the string "/" representing canonical directory separator character.

## (IO::Spec::Unix) method extension

NOTE: Most users would want to use the higher-level routine IO::Path.extension instead of this lower-level version.

Defined as:

Takes a string representing a base name and returns the characters after the last dot ("."), or empty string if no dots are present. The routine makes no attempt to detect path separators and will return everything after the last dot.

Defined as:

## (IO::Spec::Unix) method rootdir

Defined as:

Returns string '/', representing root directory.

## (IO::Spec::Unix) method split

Defined as:

Creates a IO::Path::Parts for $path, with an empty string as its volume attribute's value. Note: Before Rakudo version 2020.06 this method split the given $path into "volume", "dirname", and "basename" and returned the result as a List of three Pairs, in that order.

Defined as:

## (IO::Spec::Unix) method tmpdir

Defined as:

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.

## (IO::Spec::Unix) method updir

Defined as:

Returns a string representing the directory one up from current: