View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Leo Charre > LEOCHARRE-Dir > LEOCHARRE::Dir

Download:
LEOCHARRE-Dir-1.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.08   Source  

NAME ^

LEOCHARRE::Dir - my subs for general directory needs

SYNOPSIS ^

   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);

DESCRIPTION ^

Reading directories, etc. Made to be simple, clean cut.

SUBS ^

None are exported by default.

ls()

Argument is path to dir. Returns list array with all files, including dirs files and symlinks, etc.

lsa()

Same as ls(), but paths are absolute.

lsf()

Argument is path to dir. Returns list array with all files.

lsfa()

Same as lsf(), but paths are absolute.

lsd()

Argument is path to dir. Returns list array with all dirs.

lsda()

Same as lsd(), but paths are absolute.

lsr()

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.

lsfr()

Like lsr() but returns files.

lsdr()

Like lsr() but returns dirs.

reqdir()

Argument is path to dir. Requires that the dir exist, if not there, creates. Returns abs path to dir requested.

BUGS ^

Please contact the AUTHOR.

SEE ALSO ^

Cwd

AUTHOR ^

Leo Charre leocharre at cpan dot org

LICENSE ^

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".

DISCLAIMER ^

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.

syntax highlighting: