@@ -689,17 +689,12 @@ on Operating Systems where these are available:
689
689
690
690
= head2 method modified
691
691
692
- Return an L < Instant > object representing the timestamp when the file was
692
+ Returns an L « C < Instant > |/type/Instant » object indicating when the file was
693
693
last modified.
694
694
695
695
= for code :skip-test
696
- say "path/to/file".IO.modified; # e.g. Instant:1424089165
697
-
698
- To obtain a human-readable form of the timestamp, call C < DateTime > method
699
- on the returned C < Instant > , to convert it into a L < DateTime > object:
700
-
701
- = for code :skip-test
702
- say "path/to/file".IO.modified.DateTime; # e.g. 2015-02-16T12:18:50Z
696
+ say "path/to/file".IO.modified; # Instant:1424089165
697
+ say "path/to/file".IO.modified.DateTime; # 2015-02-16T12:18:50Z
703
698
704
699
= head2 method accessed
705
700
@@ -709,28 +704,17 @@ last accessed time may not update on I<each access> to the file, but only
709
704
on the first access after modifications.
710
705
711
706
= for code :skip-test
712
- say "path/to/file".IO.accessed; # e.g. Instant:1424353577
713
- say "path/to/file".IO.accessed.DateTime; # e.g. 2015-02-19T13:45:42Z
707
+ say "path/to/file".IO.accessed; # Instant:1424353577
708
+ say "path/to/file".IO.accessed.DateTime; # 2015-02-19T13:45:42Z
714
709
715
710
= head2 method changed
716
711
717
- Return an L < Instant > object representing the timestamp when the inode was
718
- last changed.
719
-
720
- = for code :skip-test
721
- "path/to/file".IO.changed; # e.g. Instant:1424089165
722
-
723
- To obtain a human-readable form of the timestamp, use a L < DateTime > object:
724
-
725
- = for code :skip-test
726
- say DateTime.new("path/to/file".IO.changed); # e.g. 2015-02-16T12:18:50Z
727
-
728
- or more readably:
712
+ Returns an L « C < Instant > |/type/Instant» object indicating the file or directory
713
+ was last changed.
729
714
730
715
= for code :skip-test
731
- my $change_instant = "path/to/file".IO.changed;
732
- my $change_time = DateTime.new($change_instant);
733
- say $change_time; # e.g. 2015-02-16T12:18:50Z
716
+ say "path/to/file".IO.changed; # Instant:1424089165
717
+ say "path/to/file".IO.changed.DateTime; # 2015-02-16T12:18:50Z
734
718
735
719
= head1 File permissions retrieval
736
720
0 commit comments