File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -516,8 +516,15 @@ Return an L<IntStr> object representing the POSIX permissions of a file. The
516
516
Str part of the result is the octal representation of the file permission, like
517
517
the form accepted by the chmod(1) utility.
518
518
519
- say ~"path/to/file".IO.mode; # e.g. '0644'
520
- say +"path/to/file".IO.mode; # e.g. 420, where sprintf('%04o', 420) eq '0644'
519
+ say ~"path/to/file".IO.mode; # e.g. '0644'
520
+ say +"path/to/file".IO.mode; # e.g. 420, where sprintf('%04o', 420) eq '0644'
521
+
522
+ The result of this can be used in the other methods that take a mode as an
523
+ argument.
524
+
525
+ "path/to/file1".IO.chmod("path/to/file2".IO.mode); # will change the
526
+ # permissions of file1
527
+ # to be the same as file2
521
528
522
529
= head1 Related roles and classes
523
530
You can’t perform that action at this time.
0 commit comments