Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from ichesnokov/master
Get rid of deprecated File::Mkdir usage, use Shell::Command instead
- Loading branch information
Showing
8 changed files
with
73 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,60 @@ | |||
module Shell::Command; | |||
|
|||
sub cat(*@files) is export { | |||
for @files -> $f { | |||
given open($f) { | |||
for .lines -> $line { | |||
say $line; | |||
} | |||
.close | |||
} | |||
} | |||
} | |||
|
|||
sub eqtime($source, $dest) is export { | |||
??? | |||
} | |||
|
|||
sub rm_f(*@files) is export { | |||
for @files -> $f { | |||
unlink $f if $f.IO ~~ :e; | |||
} | |||
} | |||
|
|||
sub rm_rf(*@files) is export { | |||
??? | |||
} | |||
|
|||
sub touch(*@files) is export { | |||
??? | |||
} | |||
|
|||
sub mv(*@args) is export { | |||
??? | |||
} | |||
|
|||
sub cp(*@args) is export { | |||
??? | |||
} | |||
|
|||
sub mkpath(*@paths) is export { | |||
for @paths -> $name { | |||
for [\~] $name.split('/').map({"$_/"}) { | |||
mkdir($_) unless .IO.d | |||
} | |||
} | |||
} | |||
|
|||
sub test_f($file) is export { | |||
??? | |||
} | |||
|
|||
sub test_d($file) is export { | |||
??? | |||
} | |||
|
|||
sub dos2unix($file) is export { | |||
??? | |||
} | |||
|
|||
# vim: ft=perl6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters