NAME
File::MoveToDir - Move files to a possibly non existent directory.
SYNOPSIS
use File::MoveToDir;
$mv = File::MoveToDir->make();
$mv->move_file( , );
DESCRIPTION
File::MoveToDir is OO module. There is only a constructor method, no
cloner/copier method. Purpose is to be able to move files to a possibly
non existent directory.
INTERFACE
dry_run()
If no arguments given, returns the set value.
If a argument is given, it is used to indicate whether to actually
move files. DEFAULT: false.
make() -- Constructor
Returns the File::MoveToDir object.
Following are the options, listed with default values, that can be
given as key-value pairs (say a hash) ...
*dry-run*
Indicate whether to actually move the files. DEFAULT: false.
*make-dest-dir*
Indicate whether to create non existent destination directory.
DEFAULT: true.
*noisy*
Set the level of noise generated. DEFAULT: 1 (see
"Parv::Util::UserMsg" for details).
*overwrite*
Indicate whether to overwrite already existent file. DEFAULT:
false.
make_dest_dir()
If no arguments given, returns the set value.
If a argument is given, it is used to indicate whether to create non
existent destination directory. DEFAULT: true.
make_dir()
Create the given directory path; dies on error.
If dry_run() returns a true value, directory will not be created and a
message will be printed showing the would-be action.
move_file()
Move given input file path to the given destination directory; dies on
error.
If dry_run() returns a true value, no files will be moved and a
message will be printed showing the would-be action.
noisy()
If no arguments given, returns the set value.
If a argument is given, it is used to set the level of noise
generated. DEFAULT: 1 (see "Parv::Util::UserMsg" for details).
overwrite()
If no arguments given, returns the set value.
If a argument is given, it is used to indicate whether to overwrite
already existent file. DEFAULT: false.
proceed_move()
Returns a truth value indicating whether it is safe to move a file to
the destination directory.
SEE ALSO
File::Copy
BUGS
Let me know if you find any.
AUTHOR, LICENCE, AND SUCH
Copyright(c) 2003-2004 Parv . All rights reserved.
LICENSE: This collection is free software. It can be used in any way as
desired only when proper credit is given by including this advertisement
(from Copyright to DISCLAIMER sections).
DISCLAIMER: I am not responsible for any loss or damage due to use of
this software; use it at your own risk.