Name
SPVM::File::Path - Creating and Removing Multi-Level Path
Description
SPVM::File::Path
is the File::Path
class in SPVM language. It has methods to create a multi-level path and to remove a directory that contain files or directories within them.
Usage
use File::Path;
File::Path->make_path("foo/bar");
File::Path->remove_tree("foo");
Class Methods
mkpath
static method mkpath : int ($path : string, $options : object[] = undef) ;
Creates a multi-level path.
Options:
mode
=-1
: Int-
The mode that is used by mkdir to create directories.
If the value is less than
0
, it becomes0777
.
make_path
static method make_path : int ($path : string, $options : object[] = undef);
The same as "mkpath".
rmtree
static method rmtree : int ($path : string);
Removes a directory that contain files or directories within them.
remove_tree
static method remove_tree : int ($path : string);
The same as "rmtree".
See Also
File::Path
SPVM::File::Path
is a Perl's File::Path porting to SPVM.
Repository
Author
Yuki Kimoto kimoto.yuki@gmail.com
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License