File::Find::Rule::Age - rule to match on file age


File-Find-Rule-Age documentation  | view source Contained in the File-Find-Rule-Age distribution.

Index


NAME

Top

File::Find::Rule::Age - rule to match on file age

SYNOPSIS

Top

    use File::Find::Rule::Age;
    my @old_files = find( file => age => [ older => '1M' ], in => '.' );
    my @today     = find( file => age => [ newer => '1D' ], in => '.' );

DESCRIPTION

Top

File::Find::Rule::Age makes it easy to search for files based on their age. DateTime and File::stat are used to do the behind the scenes work, with File::Find::Rule doing the Heavy Lifting.

By 'age' I mean 'time elapsed since mtime' (the last time the file was modified).

FUNCTIONS

Top

->age( [ $criterion => $age ] )

$criterion must be one of "older" or "newer". $age must match /^(\d+)([DWMYhms])$/ where D, W, M, Y, h, m and s are "day(s)", "week(s)", "month(s)", "year(s)", "hour(s)", "minute(s)" and "second(s)", respectively - I bet you weren't expecting that.

AUTHOR

Top

Pedro Figueiredo, <pedro.figueiredo at sns.bskyb.com>

BUGS

Top

Please report any bugs or feature requests to bug-find-find-rule-age at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Find-Find-Rule-Age. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Find::Find::Rule::Age




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Find-Find-Rule-Age

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Find-Find-Rule-Age

* CPAN Ratings

http://cpanratings.perl.org/d/Find-Find-Rule-Age

* Search CPAN

http://search.cpan.org/dist/Find-Find-Rule-Age

ACKNOWLEDGEMENTS

Top

Richard Clamp, the author of File::Find::Rule, for putting up with me.

COPYRIGHT

Top

SEE ALSO

Top

File::Find::Rule, DateTime, File::stat


File-Find-Rule-Age documentation  | view source Contained in the File-Find-Rule-Age distribution.