File::Xcopy

File::Xcopy can copy files after comparing them.
Download

File::Xcopy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Hanming Tu
  • Publisher web site:
  • http://search.cpan.org/~geotiger/File-Xcopy-0.12/Xcopy.pm

File::Xcopy Tags


File::Xcopy Description

File::Xcopy can copy files after comparing them. File::Xcopy can copy files after comparing them.SYNOPSIS use File::Xcopy; my $fx = new File::Xcopy; $fx->from_dir("/from/dir"); $fx->to_dir("/to/dir"); $fx->fn_pat('(.pl|.txt)$'); # files with pl & txt extensions $fx->param('s',1); # search recursively to sub dirs $fx->param('verbose',1); # search recursively to sub dirs $fx->param('log_file','/my/log/file.log'); my ($sr, $rr) = $fx->get_stat; $fx->xcopy; # or $fx->execute('copy'); # the same with short name $fx->xcp("from_dir", "to_dir", "file_name_pattern");The File::Xcopy module provides two basic functions, xcopy and xmove, which are useful for coping and/or moving a file or files in a directory from one place to another. It mimics some of behaviours of xcopy in DOS but with more functions and options.The differences between xcopy and copy are:· xcopy searches files based on file name pattern if the pattern is specified.· xcopy compares the timestamp and size of a file before it copies.· xcopy takes different actions if you tell it to.The Constructor new(%arg)Without any input, i.e., new(), the constructor generates an empty object with default values for its parameters.If any argument is provided, the constructor expects them in the name and value pairs, i.e., in a hash array.Requirements:· PerlWhat's New in This Release:· fixed a bug in the execute method.· added syscopy method to replace methods in File::Copy module. The copy method in File::Copy does not reserve the attributes of a file.· tested on Solaris and Win32 operating systems


File::Xcopy Related Software