Permalink
Browse files

remove IO::Path and IO::Dir

as the deprecation notice predicted
  • Loading branch information...
1 parent 37f890a commit 558ea68780f42b597e317e1e77b4afa3f8e39d20 @moritz moritz committed Jul 31, 2012
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/core/IO.pm
View
@@ -264,15 +264,9 @@ my class IO::Path is Cool does IO::FileTestable {
method IO(IO::Path:D:) {
IO.new(:$.path);
}
-}
-
-my class IO::File is IO::Path {
method open(IO::File:D: *%opts) {
open($.path, |%opts);
}
-}
-
-my class IO::Dir is IO::Path {
method contents() {
dir($.path);
}
@@ -285,8 +279,7 @@ sub dir(Cool $path = '.', Mu :$test = none('.', '..')) {
loop (my int $i = 0; $i < $elems; $i = $i + 1) {
my Str $file := nqp::p6box_s(nqp::atpos($RSA, $i));
if $file ~~ $test {
- my $f = IO::File.new(:basename($file), :dir($path.Str));
- @res.push: $f.d ?? IO::Dir.new(:basename($file), :dir($path.Str)) !! $f;
+ @res.push: IO::Path.new(:basename($file), :dir($path.Str));
}
}
return @res.list;

0 comments on commit 558ea68

Please sign in to comment.