Skip to content
Browse files

use nqp::file{read,writ,execut}able/fileislink on parrot and jvm

  • Loading branch information...
1 parent e587d79 commit 44b57b5ec1ef72295b135cd78f53a4700b30ecb1 @timo timo committed with moritz Jul 12, 2013
Showing with 6 additions and 8 deletions.
  1. +5 −7 src/core/IO.pm
  2. +1 −1 tools/build/NQP_REVISION
View
12 src/core/IO.pm
@@ -47,24 +47,22 @@ my role IO::FileTestable does IO {
nqp::const::STAT_FILESIZE) );
}
-#?if parrot
method l() {
- nqp::p6bool(pir::new__Ps('File').is_link(nqp::unbox_s(self.Str)))
+ nqp::p6bool(nqp::fileislink(self.Str))
}
method r() {
- nqp::p6bool(pir::new__Ps('OS').can_read(nqp::unbox_s(self.Str)))
+ nqp::p6bool(nqp::filereadable(self.Str))
}
method w() {
- nqp::p6bool(pir::new__Ps('OS').can_write(nqp::unbox_s(self.Str)))
+ nqp::p6bool(nqp::filewritable(self.Str))
}
method x() {
- nqp::p6bool(pir::new__Ps('OS').can_execute(nqp::unbox_s(self.Str)))
+ nqp::p6bool(nqp::fileexecutable(self.Str))
}
-#?endif
-
+
method z() {
self.e && self.s == 0;
}
View
2 tools/build/NQP_REVISION
@@ -1 +1 @@
-2013.06-70-g9fca92f
+2013.06-156-g0d19655

0 comments on commit 44b57b5

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