Skip to content

Commit 14ab6b5

Browse files
authored
Add more method info with examples
1 parent 839a6b3 commit 14ab6b5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/Language/io.pod6

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,18 @@ the file test method C<f>:
177177
say "testfile".IO.f; # OUTPUT: «True␤»
178178
say "lib".IO.f; # OUTPUT: «False␤»
179179
180+
There are other methods that can be used to query a file or directory, some useful ones are:
181+
182+
=begin code :skip-test
183+
my $f = "fileA";
184+
185+
say $f.modified; # return instant of file (or directory) change
186+
say $f.accessed; # return last time file (or directory) was read
187+
say $f.s; # return size of file (or directory inode) in bytes
188+
=end code
189+
190+
See more methods and details at <L<IO::Path|/type/IO::Path>.
191+
180192
=head1 Getting a directory listing
181193
182194
To list the contents of the current directory, use the C<dir> function. It

0 commit comments

Comments
 (0)