controlchan testing

Fabien Tassin fta at sofaraway.org
Tue May 8 16:20:58 UTC 2001


According to Russ Allbery:
> 
> (In general, the best approach is to just assume that you can never rename
> files between directories, and only relax that assumption if you have
> strong evidence to the contrary.)

what about using File::Copy ? AFAIR, it's there since Perl 5.002
which is enough according to INN requirements.

NAME
       File::Copy - Copy files or filehandles

SYNOPSIS
               use File::Copy;

               copy("file1","file2");
               copy("Copy.pm",\*STDOUT);'
               move("/dev1/fileA","/dev2/fileB");

...

       ·   The `move' function also takes two parameters: the
           current name and the intended name of the file to be
           moved.  If the destination already exists and is a
           directory, and the source is not a directory, then the
           source file will be renamed into the directory speci­
           fied by the destination.

           If possible, move() will simply rename the file.
           Otherwise, it copies the file to the new location and
           deletes the original.  If an error occurs during this
           copy-and-delete process, you may be left with a (pos­
           sibly partial) copy of the file under the destination
           name.

-- 
Fabien Tassin -+- fta at sofaraway.org


More information about the inn-workers mailing list