Permalink
Browse files

Get rid of File::Copy, Rakudo has an IO::copy method now

  • Loading branch information...
1 parent 1ad23e0 commit ed7310a4e88ab1468976e56910cce9870a6688c8 @tadzik committed Mar 13, 2011
Showing with 0 additions and 47 deletions.
  1. +0 −34 lib/File/Copy.pm
  2. +0 −10 t/02-file-copy.t
  3. +0 −3 t/test.file
View
34 lib/File/Copy.pm
@@ -1,34 +0,0 @@
-use v6;
-
-module File::Copy;
-
-sub cp(Str $from, Str $to) is export {
- my $f1 = open $from, :r, :bin;
- my $f2 = open $to, :w, :bin;
- $f2.write($f1.read(4096)) until $f1.eof;
- $f1.close;
- $f2.close;
-}
-
-=begin pod
-
-=head1 NAME
-
-File::Copy -- copy files
-
-=head1 SYNOPSIS
-
- use File::Copy;
-
- cp 'source', 'destination';
-
-=head1 DESCRIPTION
-
-C<File::Copy> exports just one subroutine, cp taking two string
-parameters: source and destination. If something comes wrong, the
-internal open() or write() calls will die, C<copy()> has no special
-error reporting.
-
-=end pod
-
-# vim: ft=perl6
View
10 t/02-file-copy.t
@@ -1,10 +0,0 @@
-use v6;
-use Test;
-use File::Copy;
-
-cp 't/test.file', 't/another.file';
-is slurp('t/test.file'),
- slurp('t/another.file'),
- "copied file is identical";
-unlink 't/another.file';
-done;
View
3 t/test.file
@@ -1,3 +0,0 @@
-foo foo
-asd
-foo bar

0 comments on commit ed7310a

Please sign in to comment.