Name
SPVM::File::Spec - Portably Perform Operations on File Names
Description
File::Spec class in SPVM has methods to portably perform operations on file names.
Details
This class has a singleton object of File::Spec::Instance.
Every methods in this class calls the method of the singleton object.
Usage
use File::Spec;
my $file = File::Spec->catfile(["foo", "bar", "a.txt"]);
Class Methods
canonpath
static method canonpath : string ($path : string);
Calls File::Spec::Instance#canonpath method given the singleton object and the arguments, and returns its return value.
catdir
static method catdir : string ($parts : string[]);
Calls File::Spec::Instance#catdir method given the singleton object and the arguments, and returns its return value.
catfile
static method catfile : string ($parts : string[]);
Calls File::Spec::Instance#catfile method given the singleton object and the arguments, and returns its return value.
curdir
static method curdir : string ();
Calls File::Spec::Instance#curdir method given the singleton object, and returns its return value.
devnull
static method devnull : string ();
Calls File::Spec::Instance#devnull method given the singleton object, and returns its return value.
rootdir
static method rootdir : string ();
Calls File::Spec::Instance#rootdir method given the singleton object, and returns its return value.
tmpdir
static method tmpdir : string ();
Calls File::Spec::Instance#tmpdir method given the singleton object, and returns its return value.
updir
static method updir : string ();
Calls File::Spec::Instance#updir method given the singleton object, and returns its return value.
no_upwards
static method no_upwards : string[] ($parts : string[]);
Calls File::Spec::Instance#no_upwards method given the singleton object and the arguments, and returns its return value.
file_name_is_absolute
static method file_name_is_absolute : int ($path : string);
Calls File::Spec::Instance#file_name_is_absolute method given the singleton object and the arguments, and returns its return value.
path
static method path : string[] ();
Calls File::Spec::Instance#path method given the singleton object, and returns its return value.
join
static method join : string ($parts : string[]);
Calls File::Spec::Instance#join method given the singleton object and the arguments, and returns its return value.
splitpath
static method splitpath : string[] ($path : string, $no_file : int = 0);
>
Calls File::Spec::Instance#splitpath method given the singleton object and the arguments, and returns its return value.
splitdir
static method splitdir : string[] ($path : string);
Calls File::Spec::Instance#splitdir method given the singleton object and the arguments, and returns its return value.
catpath
static method catpath : string ($volume : string, $dir : string, $file : string);
Calls File::Spec::Instance#catpath method given the singleton object and the arguments, and returns its return value.
abs2rel
static method abs2rel : string ($path : string, $base : string = undef);
Calls File::Spec::Instance#abs2rel method given the singleton object and the arguments, and returns its return value.
rel2abs
static method rel2abs : string ($path : string, $base : string = undef);
Calls File::Spec::Instance#rel2abs method given the singleton object and the arguments, and returns its return value.
See Also
Porting
SPVM::File::Spec
is Perl's File::Spec porting to SPVM.
Repository
Author
Yuki Kimoto [email protected]
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License