SPVM::File::Basename - Parsing File Path into Directory and Base Name
The File::Basename class of SPVM has the methods to parse a file path into the directory part and the base name part.
use File::Basename; my $path = "dir/a.txt"; # fileparse { my $ret = File::Basename->fileparse($path); # a.txt my $base_name = $ret->[0]; # dir/ my $dir_name = $ret->[1]; } # basename { # a.txt my $base_name = File::Basename->basename($path); } # dirname { # dir my $dir_name = File::Basename->dirname($path); }
File::Basename::Interface
static method fileparse : string[] ($path : string);
static method basename : string ($path : string);
static method dirname : string ($path : string);
File::Basename is implemented using the following classes.
File::Basename
SPVM::File::Basename is a Perl's File::Basename porting to SPVM.
SPVM::File::Basename
SPVM::File::Basename - Github
Yuki Kimoto kimoto.yuki@gmail.com
kimoto.yuki@gmail.com
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::File::Basename, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::File::Basename
CPAN shell
perl -MCPAN -e shell install SPVM::File::Basename
For more information on module installation, please visit the detailed CPAN module installation guide.