Skip to content

Commit 3fb1211

Browse files
authored
add missing file remove routine "unlink"
1 parent 96ffda7 commit 3fb1211

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/Language/io.pod6

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ To explicitly write binary data to a file, open it with the C<:bin> option.
110110
The input/output operations then will take place using the C<Buf> type instead
111111
of the C<Str> type.
112112
113-
=head1 Copying and renaming files
113+
=head1 Copying, renaming, and removing files
114114
115-
Routines C<copy>, C<rename>, and C<move> are available to avoid low-level system
116-
commands. See details at L<copy|/routine/copy>, L<rename|/routine/rename>, and
117-
L<move|/routine/move>. Some examples:
115+
Routines C<copy>, C<rename>, C<move>, and C<unlink> are available to avoid low-level system
116+
commands. See details at L<copy|/routine/copy>, L<rename|/routine/rename>,
117+
L<move|/routine/move>, and C<unlink|/routine/unlink>. Some examples:
118118
119119
=begin code
120120
my $filea = 'foo';
@@ -131,6 +131,10 @@ rename $filea, 'new-foo', :createonly; # fails if 'new-foo' exists
131131
# use move when a system-level rename may not work
132132
move $fileb, '/disk2/foo'; # overwrites '/disk2/foo' if it exists
133133
move $fileb, '/disk2/foo', :createonly; # fails if '/disk2/foo' exists
134+
135+
unlink $filea; # removes $filea
136+
$fileb.IO.unlink; # removes $fileb
137+
134138
=end code
135139
136140
=head1 Checking files and directories

0 commit comments

Comments
 (0)