Permalink
Browse files

add IO::Path.succ and .pred

  • Loading branch information...
1 parent 74ddcd4 commit 0c78d26c03c67b50d8de89496b76a38d5b6a1e6a @labster labster committed Jun 16, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/IO.pm
View
8 src/core/IO.pm
@@ -340,6 +340,14 @@ my class IO::Path is Cool does IO::FileTestable {
self.basename.Int;
}
+ method succ(IO::Path:D:) {
+ self.new(:$.volume, :$.directory, basename=> $.basename.succ)
+ }
+ method pred(IO::Path:D:) {
+ self.new(:$.volume, :$.directory, basename=> $.basename.pred)
+ }
+
+
method path(IO::Path:D:) {
self;
}

0 comments on commit 0c78d26

Please sign in to comment.