Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IO::FileTestable: link anchors, mention method form
  • Loading branch information
moritz committed Jan 15, 2015
1 parent c5c4e68 commit 0e44c0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/Type/IO/FileTestable.pod
Expand Up @@ -10,13 +10,19 @@
=head2 File Test operators
X<-e> X<:-f>
-e
-f Does not exist in Perl 6. See :e, :f.
X<-M> X<-A> X<-C>
-M Does not exist in Perl 6. See C<modified>.
-A Does not exist in Perl 6. See C<accessed>.
-C Does not exist in Perl 6. See C<changed>.
X<:e> X<:d> X<:f> X<:l> X<:r> X<:w> X<:x> X<:s> X<:z>
:e Exists
:d Directory
:f File
Expand All @@ -40,6 +46,12 @@ If you have a string - a path to something in the filesystem:
say 'file exists';
}
Instead of the colonpair syntax, you can use method calls too:
if 'path/to/file'.IO.e {
say 'file exists';
}
If you already have an IO object in $file, either by creating one yourself,
or by getting it from another subroutine, such as C<dir>,
you can write this:
Expand Down

0 comments on commit 0e44c0c

Please sign in to comment.