Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add missing filetest primitives for consistency
  • Loading branch information
lizmat committed Dec 20, 2014
1 parent 6be8ec8 commit d1b5249
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/IO.pm
Expand Up @@ -306,6 +306,14 @@ sub FILETEST-RW(Str $abspath) {
sub FILETEST-X(Str $abspath) {
nqp::p6bool(nqp::fileexecutable(nqp::unbox_s($abspath)));
}
sub FILETEST-RX(Str $abspath) {
my str $p = nqp::unbox_s($abspath);
nqp::p6bool(nqp::filereadable($p) && nqp::fileexecutable($p));
}
sub FILETEST-WX(Str $abspath) {
my str $p = nqp::unbox_s($abspath);
nqp::p6bool(nqp::filewritable($p) && nqp::fileexecutable($p));
}
sub FILETEST-RWX(Str $abspath) {
my str $p = nqp::unbox_s($abspath);
nqp::p6bool(
Expand Down

0 comments on commit d1b5249

Please sign in to comment.