Dennis Opacki > File-List-0.3.1 > File::List

Download:
File-List-0.3.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.3.1   Source  

NAME ^

File::List - Perl extension for crawling directory trees and compiling lists of files

SYNOPSIS ^

  use File::List;

  my $search = new File::List("/usr/local");
  $search->show_empty_dirs();                   # toggle include empty directories in output
  my @files  = @{ $search->find("\.pl\$") };    # find all perl scripts in /usr/local

DESCRIPTION ^

This module crawls the directory tree starting at the provided base directory and can return files (and/or directories if desired) matching a regular expression

INTERFACE ^

The following methods are available in this module.

new($base);

This creates a new File::List object and starts crawling the tree from this base

It takes a scalar base directory as an argument and returns an object reference

find($regexp);

This method accepts a scalar regular expression to search for.

It returns a reference to an array containing the full path to files matching the expression (under this base).

debug($level);

This sets the debug level for find

show_empty_dirs();

Toggle display of empty directories

show_only_dirs();

Toggle display of just directories

AUTHOR ^

Dennis Opacki, dopacki@internap.com

SEE ALSO ^

perl(1).

syntax highlighting: