SPVM::Cwd - Getting Pathname of Current Working Directory
use Cwd; my $dir = Cwd->getcwd; my $abs_path = Cwd->abs_path($file);
SPVM::Cwd provides methods for determining the pathname of the current working directory.
SPVM::Cwd
This module is the Perl's Cwd porting to SPVM.
static method getcwd : string ();
Calls the getcwd method in the Sys::IO class and returns the return value.
On Windows, the path separaters \ of the return value are replaced with /.
\
/
static method abs_path : string ($file :string)
The alias for the "realpath" method.
static method realpath : string ($file : string)
Calls the realpath method in the Sys::IO class except for Windows and returns the return value.
On Windows, Calls the _fullpath method in the Sys::IO class and returns the return value.
static method getdcwd : string ($drive = undef : string) {
The $drive is a drive letter such as C:, D:. It is converted to the drive id.
$drive
C:
D:
And calls the _getdcwd method in the Sys::IO returns the return value.
On Windows, the path separaters \ of the return value are replaced with /
Exceptions:
The getdcwd is not supported on this system(_WIN32).
The length of the $drive must be 2.
The first character of the $drive must be [a-zA-Z].
The second character of the $drive must be ":".
https://github.com/yuki-kimoto/SPVM-Cwd
SPVM::Sys provides system calls for changing working directory. SPVM::Cwd calls the methods in the SPVM::Sys class.
SPVM::Cwd is the Perl's Cwd porting to SPVM.
Yuki Kimoto kimoto.yuki@gmail.com
kimoto.yuki@gmail.com
Copyright 2022-2023 Yuki Kimoto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SPVM::Cwd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::Cwd
CPAN shell
perl -MCPAN -e shell install SPVM::Cwd
For more information on module installation, please visit the detailed CPAN module installation guide.