Filesys-Virtual-Plain
view release on metacpan or search on metacpan
my $new_cwd = $self->_resolve_path($dir);
my $full_path = $self->root_path().$new_cwd;
return ((-e $full_path) && (-d $full_path)) ? $self->cwd($new_cwd) : undef;
}
=pod
=head2 mkdir($dir, $mode)
Creats a directory with $mode (defaults to 0755) and chown()'s the directory
with the uid and gid. The return value is from mkdir().
=cut
sub mkdir {
my ($self, $dir, $mode) = @_;
$dir = $self->_path_from_root($dir);
return 2 if (-d $dir);
$mode ||= 0755;
my $ret = (mkdir($dir, $mode)) ? 1 : 0;
if ($ret) {
chown($self->{uid}, $self->{gid}, $dir);
}
return $ret;
}
=pod
=head2 rmdir($dir)
Deletes a directory or file if -d test fails. Returns 1 on success or 0 on
failure.
Gets the size of a file in bytes.
delete($file)
Deletes a file, returns 1 or 0 on success or failure.
chdir($dir)
Changes the cwd to a new path from root_path. Returns undef on failure
or the new path on success.
mkdir($dir, $mode)
Creats a directory with $mode (defaults to 0755) and chown()'s the
directory with the uid and gid. The return value is from mkdir().
rmdir($dir)
Deletes a directory or file if -d test fails. Returns 1 on success or 0
on failure.
list($dir)
Returns an array of the files in a directory.
list_details($dir)
( run in 1.334 second using v1.01-cache-2.11-cpan-71847e10f99 )