Skip to content

Commit 5e2a992

Browse files
committed
Add link/symlink
1 parent 1eed4d3 commit 5e2a992

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/Type/IO/Path.pod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,24 @@ device).
252252
253253
B<NOTE>: This function has not yet been implemented in Rakudo.
254254
255+
=head2 routine symlink
256+
257+
method symlink(IO::Path:D: Str $name --> Bool);
258+
sub symlink(Str $target, Str $name --> Bool);
259+
260+
Create a new symbolic link named as $target (or the name of the invocant in the method form,) to the existing file named C<$name>.
261+
262+
Both forms will return C<True> on success or L<fail|/routine/fail> with L<X::IO::Symlink> if the symbolic link could not be created.
263+
264+
=head2 routine link
265+
266+
method link(IO::Path:D: Str $name --> Bool);
267+
sub link(Str $target, Str $name --> Bool);
268+
269+
Create a new link named as $target (or the name of the invocant in the method form,) to the existing file named C<$name>.
270+
271+
Both forms will return C<True> on success or L<fail|/routine/fail> with L<X::IO::Link> if the link operation could not be performed.
272+
255273
=head2 routine unlink
256274
257275
method unlink(IO::Path:D: --> Bool);

0 commit comments

Comments
 (0)