10 Oct 2020 20:59:43 UTC
- Distribution: LEOCHARRE-Dir
- Module version: 1.09
- Source (raw)
- Pod Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (506 / 0 / 0)
- KwaliteeBus factor: 1
- 86.02% Coverage
- License: perl_5
- Activity24 month
- Download (4.17KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionLEOCHARRE Leo Charreand 1 contributors
- Leo Charre leocharre at cpan dot org
- SEE ALSO
LEOCHARRE::Dir - my subs for general directory needs
use LEOCHARRE::Dir ':all'; my $dir = reqdir("./make_sure_dir_is_here"); my @ls = ls($dir); my @files = lsf($dir); my @dirs = lsd($dir); my @abs_dirs = lsda($dir); my @abs_files = lsfa($dir); my @abs_all = lsa($dir);
Reading directories, etc. Made to be simple, clean cut.
None are exported by default.
Argument is path to directory. Returns array of entries. With all files, including directories, files and symlinks, etc.
Same as ls(), but paths returned are absolute.
Argument is path to dir. Returns array with all files.
Same as lsf(), but paths are absolute.
Argument is path to dir. Returns array with all dirs.
Same as lsd(), but paths are absolute.
Argument is path to dir. Returns paths relative to ENV DOCUMENT ROOT. Slash at front is included. ENV DOCUMENT ROOT must be set or dies. If none in list, returns undef; If it is not within ENV DOCUMENT ROOT, returns undef. This uses Cwd::abs_path thus it resolves symlinks, this cgi-bin may not be within DOCUMENT ROOT, note. Returns array list.
Like lsr() but returns files.
Like lsr() but returns dirs.
Argument is path to dir. Requires that the dir exist, if not there, creates. Returns abs path to dir requested.
Please contact the AUTHOR.
Not meant to work under windows environments/cygwin etc.
Leo Charre leocharre at gmail dot com
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the "GNU General Public License" for more details.
Module Install Instructions
To install LEOCHARRE::Dir, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install LEOCHARRE::Dir
For more information on module installation, please visit the detailed CPAN module installation guide.