Navigation Menu

Skip to content

Commit

Permalink
[core/IO] created/modified/accessed/changed methods
Browse files Browse the repository at this point in the history
Not spec yet, but the spec sounded very non-committal, and I need those
methods now. :)
  • Loading branch information
Carl Masak committed Sep 15, 2010
1 parent 15c3f75 commit 5507cf6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/IO.pm
Expand Up @@ -170,6 +170,11 @@ class IO is Cool {
multi method z() {
$.e && $.s == 0;
}
multi method created() { ::Instant.from-posix($.stat.createtime) }
multi method modified() { ::Instant.from-posix($.stat.modifytime) }
multi method accessed() { ::Instant.from-posix($.stat.accesstime) }
multi method changed() { ::Instant.from-posix($.stat.changetime) }
}

multi sub get(IO $filehandle = $*ARGFILES) { $filehandle.get };
Expand Down

0 comments on commit 5507cf6

Please sign in to comment.