App-GitFind
view release on metacpan or search on metacpan
lib/App/GitFind/PathClassMicro.pm view on Meta::CPAN
my $file = file('/foo//baz/./foo.txt')->cleanup;
# $file now represents '/foo/baz/foo.txt';
=item $dir->resolve
Performs a physical cleanup of the file path. For instance:
my $file = file('/foo/baz/../foo.txt')->resolve;
# $file now represents '/foo/foo.txt', assuming no symlinks
This actually consults the filesystem to verify the validity of the
path.
=item $dir = $file->dir
Returns a C<App::GitFind::PathClassMicro::Dir> object representing the directory
containing this file.
=item $dir = $file->parent
A synonym for the C<dir()> method.
lib/App/GitFind/PathClassMicro.pm view on Meta::CPAN
my $dir = dir('/foo//baz/./foo')->cleanup;
# $dir now represents '/foo/baz/foo';
=item $dir->resolve
Performs a physical cleanup of the file path. For instance:
my $dir = dir('/foo//baz/../foo')->resolve;
# $dir now represents '/foo/foo', assuming no symlinks
This actually consults the filesystem to verify the validity of the
path.
=item $file = $dir->file( <dir1>, <dir2>, ..., <file> )
Returns a L<App::GitFind::PathClassMicro::File> object representing an entry in C<$dir>
or one of its subdirectories. Internally, this just calls C<<
App::GitFind::PathClassMicro::File->new( @_ ) >>.
=item $subdir = $dir->subdir( <dir1>, <dir2>, ... )
( run in 0.493 second using v1.01-cache-2.11-cpan-73692580452 )