Name

SPVM::File::Spec - Performing Operations on File Names Portably

Description

The File::Spec class of SPVM has methods to perform operations on file names portably.

Usage

use File::Spec;

my $file = File::Spec->catfile(["foo", "bar"], "a.txt"]);

Class Methods

canonpath

static method canonpath : string ($path : string);

catdir

static method catdir : string ($directories : string[]);

catfile

static method catfile : string ($directories : string[], $filename : string);

curdir

static method curdir : string ();

devnull

static method devnull : string ();

rootdir

static method rootdir : string ();

tmpdir

static method tmpdir : string ();

updir

static method updir : string ();

no_upwards

static method no_upwards : string[] ($directories : string[]);

file_name_is_absolute

static method file_name_is_absolute : int ($path : string);

file_name_is_root

static method file_name_is_root : int ($path : string);

path

static method path : string[] ();

join

static method join : string ($directories : string[], $filename : string);

splitpath

static method splitpath : string[] ($path : string, $no_file : int = 0);

splitdir

static method splitdir : string[] ($path : string);

catpath

static method catpath : string ($volume : string, $directory : string, $file : string);

abs2rel

static method abs2rel : string ($path : string, $base : string = undef);

rel2abs

static method rel2abs : string ($path : string, $base : string = undef);

Object Oriented Classes

The following classes are used to implement SPVM::File::Spec.

SPVM::Cwd

SPVM::Cwd is included in this distribution.

See Also

File::Spec

SPVM::File::Spec is Perl's File::Spec porting to SPVM.

Repository

SPVM::File::Spec - Github

Author

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License