Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@gam

Re-adding implementations for IO.modified, IO.changed and IO.accessed, since these were lost after the switch to nom. Other than minor boxing updates, they should be identical to the original versions.

@moritz moritz merged commit 631d8ab into rakudo:nom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 21, 2012
  1. @gam
This page is out of date. Refresh to see the latest.
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() {
Something went wrong with that request. Please try again.