Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update File::Tools with patches from sergot++
  • Loading branch information
Tadeusz Sośnierz committed Aug 18, 2012
1 parent 2e350d1 commit 9c4e4cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ext/File__Tools/lib/Shell/Command.pm
@@ -1,4 +1,5 @@
module Shell::Command;
use File::Find;

sub cat(*@files) is export {
for @files -> $f {
Expand All @@ -17,12 +18,17 @@ sub eqtime($source, $dest) is export {

sub rm_f(*@files) is export {
for @files -> $f {
unlink $f if $f.IO ~~ :e;
unlink $f if $f.IO.e;
}
}

sub rm_rf(*@files) is export {
???
for @files -> $path {
for find(dir => $path).map({ .Str }).reverse -> $f {
$f.IO.d ?? rmdir($f) !! unlink($f);
}
rmdir $path;
}
}

sub touch(*@files) is export {
Expand Down

0 comments on commit 9c4e4cf

Please sign in to comment.