Name
SPVM::File::Path - Creating and Removing Multi-Level Path
Description
File::Path in SPVM 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->mkpath("foo/bar");
File::Path->rmtree("foo");
Class Methods
mkpath
static method mkpath : int ($path : string, $options : object[] = undef);
Creates a multi-level path given the $path and the options $otptions.
Options:
mode : Int = -1
-
The mode that is used by mkdir to create directories.
If the value is less than
0
, it becomes0777
.
See Perl's "mkpath" in File::Path for details.
make_path
static method make_path : int ($path : string, $options : object[] = undef);
The same as "mkpath" method.
rmtree
static method rmtree : int ($path : string);
Removes a directory $path that contain files or directories within them.
See Perl's "rmtree" in File::Path for details.
remove_tree
static method remove_tree : int ($path : string);
The same as "rmtree" method.
Porting
SPVM::File::Path
is a Perl's File::Path porting to SPVM.
See Also
Repository
Author
Yuki Kimoto [email protected]
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License