File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ of the C<Str> type.
93
93
= head1 Checking files and directories
94
94
95
95
Use the C < e > method on an C < IO::Handle > object to test whether the file or
96
- directory exist .
96
+ directory exists .
97
97
98
98
if "nonexistent_file".IO.e {
99
99
say "file exists";
@@ -135,9 +135,8 @@ the file test method C<f>:
135
135
136
136
= head1 Getting a directory listing
137
137
138
- To list the files and directories in the current directory, one merely needs
139
- to use the C < dir > function. This returns a list of L < IO::Path > objects one
140
- can then write to, read from etc.
138
+ To list the contents of the current directory, use the C < dir > function. It
139
+ returns a list of L < IO::Path > objects.
141
140
142
141
say dir; # "/path/to/testfile".IO "/path/to/lib".IO
143
142
@@ -154,13 +153,11 @@ directory name as its argument:
154
153
mkdir "newdir";
155
154
156
155
The function returns the name of the created directory on success and C < Nil >
157
- on failure. Thus the standard Perl idiom
156
+ on failure. Thus the standard Perl idiom works as expected:
158
157
159
158
mkdir "newdir" or die "$!";
160
159
161
- works as expected.
162
-
163
- Similarly, one can remove I < empty > directories with C < rmdir > :
160
+ Use C < rmdir > to emove I < empty > directories:
164
161
165
162
rmdir "newdir" or die "$!";
166
163
You can’t perform that action at this time.
0 commit comments