Skip to content
Browse files

added stat times (modified/changed/accessed) for IO

  • Loading branch information...
1 parent 6ef66c9 commit edf2e0d5d7e9ea7c3417717f163698113692e165 @gam gam committed Apr 21, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/core/IO.pm
View
12 src/core/IO.pm
@@ -189,6 +189,18 @@ class IO {
self.e && self.s == 0;
}
+ method modified() {
+ nqp::p6box_i(pir::stat__Isi(nqp::unbox_s($!path), pir::const::STAT_MODIFYTIME));
+ }
+
+ method accessed() {
+ nqp::p6box_i(pir::stat__Isi(nqp::unbox_s($!path), pir::const::STAT_ACCESSTIME));
+ }
+
+ method changed() {
+ nqp::p6box_i(pir::stat__Isi(nqp::unbox_s($!path), pir::const::STAT_CHANGETIME));
+ }
+
# not spec'd
method copy($dest) {
if self.d() {

0 comments on commit edf2e0d

Please sign in to comment.
Something went wrong with that request. Please try again.