Lines Matching full:copy
1 # File/Copy.pm. Written in 1994 by Aaron Sherman <ajs@ajs.com>. This
8 package File::Copy;
21 sub copy;
30 @EXPORT = qw(copy move);
67 sub copy { subroutine
68 croak("Usage: copy(FROM, TO [, BUFFERSIZE]) ")
77 croak("Bad buffer size for copy: $size\n") unless ($size > 0);
126 # copy, but we want the Unixy behavior of inheriting from
214 return 0 unless copy(@_) and @fromstat;
224 # since File::Copy is used during the Perl build.
270 # copy, but we want the Unixy behavior of inheriting from
311 sub move { _move(@_,\©); }
326 *syscopy = \©
336 File::Copy - Copy files or filehandles
340 use File::Copy;
342 copy("sourcefile", "destinationfile") or die "Copy failed: $!";
343 copy("Copy.pm", \*STDOUT);
346 use File::Copy "cp";
353 The File::Copy module provides two basic functions, C<copy> and
359 =item copy
360 X<copy> X<cp>
362 The C<copy> function takes two
363 parameters: a file to copy from and a file to copy to. Either
369 directory does exist, then it will be created. Trying to copy
371 Trying to copy a file on top of itself is also an error.
372 C<copy> will not overwrite read-only files.
394 You may use the syntax C<use File::Copy "cp"> to get at the C<cp>
398 C<cp(1)> would do with default options, while C<copy> uses the default
418 during this copy-and-delete process, you may be left with a (possibly partial)
419 copy of the file under the destination name.
422 you may use the C<cp> alias for C<copy>.
427 File::Copy also provides the C<syscopy> routine, which copies the
431 C<copy> routine, which doesn't preserve OS-specific attributes. For
438 If both arguments to C<copy> are not file handles,
439 then C<copy> will perform a "system copy" of
442 parameter is ignored. If either argument to C<copy> is a
447 The system copy routine may also be called directly under VMS and OS/2
448 as C<File::Copy::syscopy> (or under VMS as C<File::Copy::rmscopy>, which
477 to C<rmscopy> is 0, then it behaves much like the DCL COPY command:
487 File::Copy::rmscopy($from, $to) or die $!;
489 Like C<copy>, C<rmscopy> returns 1 on success. If an error occurs,
501 Before calling copy() or move() on a filehandle, the caller should
503 is the case even for move(), because it may actually copy the file,
509 File::Copy was written by Aaron Sherman I<E<lt>ajs@ajs.comE<gt>> in 1995,