Name
SPVM::File::Spec::Instance::Win32 - Implementation of File::Spec::Instance for Windows
Description
The File::Spec::Instance::Win32 class in SPVM is an implementation of File::Spec::Instance for Windows.
Usage
my $spec = File::Spec::Instance::Win32->new;
my $file = $spec->catfile(["foo", "bar", "a.txt"]);
Super Class
Class Methods
new
static method new : File::Spec::Instance::Win32 ();
>
Creates a new File::Spec::Instance::Win32 object, and returns it.
Instance Methods
devnull
method devnull : string ();
Returns a string representation of the null device.
See "devnull" in File::Spec::Win32 for details.
tmpdir
method tmpdir : string ();
Returns a string representation of the first existing directory.
See "tmpdir" in File::Spec::Win32 for details.
file_name_is_absolute
method file_name_is_absolute : int ($path : string);
As of right now, this returns 2 if the path $path is absolute with a volume, 1 if it's absolute with no volume, 0 otherwise.
See "file_name_is_absolute" in File::Spec::Win32 for details.
catfile
method catfile : string ($parts : string[]);
Concatenate one or more directory names and a filename $parts to form a complete path ending with a filename, and returns it.
See "catfile" in File::Spec::Win32 for details.
canonpath
method canonpath : string ($path : string);
Returns a logical cleanup of a path from the path $path on Windows.
splitpath
method splitpath : string[] ($path : string, $nofile : int = 0);
Splits a path into volume, directory, and filename portions, and returns them as an array.
See "splitpath" in File::Spec::Win32 for details.
splitdir
method splitdir : string[] ($path : string);
Splits the path $path to directory portions, and return them as an array.
See "splitdir" in File::Spec::Win32 for details.
catpath
method catpath : string ($volume : string, $dir : string, $file : string);
Takes volume, directory and file portions and returns an entire path.
See "catpath" in File::Spec::Win32 for details.
rootdir
method rootdir : string ();
Returns a string representation of the root directory. "\" on Windows.
Currently, File::Spec::Win32 does not provide detailed documentation for this method.
path
method path : string[] ();
Returns the environment variable PATH
as a array.
Currently, File::Spec::Win32 does not provide detailed documentation for this method.
catdir
method catdir : string ($dir_parts : string[]);
Concatenates two or more directory names $parts to form a complete path ending with a directory, and returns it.
Currently, File::Spec::Win32 does not provide detailed documentation for this method.
rel2abs
method rel2abs : string ($path : string, $base : string = undef);
Converts a relative path to an absolute path $path and an optional base path $base, and returns it.
Currently, File::Spec::Win32 does not provide detailed documentation for this method.
Author
Yuki Kimoto kimoto.yuki@gmail.com
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License