-
-
02 Oct 2013 17:43:33 UTC
- Distribution: File-Find-Rule-DirCompare
- Module version: 0.020
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (437 / 34 / 0)
- Kwalitee
Bus factor: 1- 87.10% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (5.35KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- File::Find::Rule
- Params::Util
- Text::Glob
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
File::Find::Rule::DirCompare - Find files by comparing with 2nd directory
VERSION
Version 0.01
SYNOPSIS
use File::Find::Rule::DirCompare; my @only_in_searchdir = find( file => not_exists_in => $cmpdir, in => $searchdir ); my @in_both_dirs = find( file => exists_in => $cmpdir, in => $searchdir ); my @newer_in_cmpdir = find( file => newer_in => $cmpdir, in => $searchdir ); my @older_in_cmpdir = find( file => older_in => $cmpdir, in => $searchdir ); # or use OO interface my $Find; $Find = File::Find::Rule->file->not_exists_in( $cmpdir ); my @ois = $Find->in( $searchdir ); $Find = File::Find::Rule->file->exists_in( $cmpdir ); my @ibd = $Find->in( $searchdir ); $Find = File::Find::Rule->file->newer_in( $cmpdir ); my @nic = $Find->in( $searchdir ); $Find = File::Find::Rule->file->older_in( $cmpdir ); my @oic = $Find->in( $searchdir ); # sure it can be combined ... $Find = File::Find::Rule->file ->any( File::Find::Rule->new->not_exists_in( $cmpdir ), File::Find::Rule->new->newer_in( $cmpdir ), ); my @newer_or_newly = $Find->in( $searchdir );
EXPORT
This module doesn't export any function. The provided functionality is called by File::Find::Rule according to the matching rules.
SUBROUTINES/METHODS
exists_in
Accept a list of directory names to be checked if found files exists in any of them or not. The directory names are interpreted relative to the current directory ("cwd" in Cwd), not relative to the directory specified in
in
. To ensure the right directory is chosen, specify an absolute path.If the first argument is an array reference, the list in this array will be used.
not_exists_in
Accept a list of directory names to be checked if found files does not exists in any of them or not. The directory names are interpreted relative to the current directory ("cwd" in Cwd), not relative to the directory specified in
in
. To ensure the right directory is chosen, specify an absolute path.If the first argument is an array reference, the list in this array will be used.
newer_in
Accept a list of directory names to be checked if found files exists in any of them and have a newer timestamp when it's last modified. The directory names are interpreted relative to the current directory ("cwd" in Cwd), not relative to the directory specified in
in
. To ensure the right directory is chosen, specify an absolute path.If the first argument is an array reference, the list in this array will be used.
older_in
Accept a list of directory names to be checked if found files exists in any of them and have an older timestamp when it's last modified. The directory names are interpreted relative to the current directory ("cwd" in Cwd), not relative to the directory specified in
in
. To ensure the right directory is chosen, specify an absolute path.If the first argument is an array reference, the list in this array will be used.
AUTHOR
Jens Rehsack,
<rehsack at cpan.org>
BUGS
Please report any bugs or feature requests to
bug-file-find-rule-dircompare at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-DirCompare. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc File::Find::Rule::DirCompare
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Find-Rule-DirCompare
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2010-2013 Jens Rehsack.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install File::Find::Rule::DirCompare, copy and paste the appropriate command in to your terminal.
cpanm File::Find::Rule::DirCompare
perl -MCPAN -e shell install File::Find::Rule::DirCompare
For more information on module installation, please visit the detailed CPAN module installation guide.