Skip to content

Commit

Permalink
[io grant] Fix docs for symlink/link routines
Browse files Browse the repository at this point in the history
- Fix issues with argument naming
- List new type constraints for args
- Mention symlink caveat on Windows

Rakudo impl: rakudo/rakudo@8c09c84d64
             rakudo/rakudo@da1dea2ea0
Tests:       Raku/roast@d4353b6d00
             Raku/roast@8fa49e10a4
  • Loading branch information
zoffixznet committed Apr 14, 2017
1 parent 4c3d62b commit fff866f
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions doc/Type/IO/Path.pod6
Expand Up @@ -620,25 +620,27 @@ physical storage device).
=head2 routine symlink
method symlink(IO::Path:D: Str $name --> Bool)
sub symlink(Str $target, Str $name --> Bool)
method symlink(IO::Path:D $target: IO() $link --> Bool:D)
sub symlink( IO() $target, IO() $link --> Bool:D)
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>.
Create a new I<symbolic> link C<$link> to existing C<$target>.
Returns C<True> on success; L<fails|/routine/fail> with
L<X::IO::Symlink> if the symbolic link could not be created. If C<$target>
does not exist, creates a dangling symbolic link.
To create a hard link, see L«C<link>|/routine/link».
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.
B<Note:> on Windows, creation of symbolic links may require escalated
privileges.
=head2 routine link
method link(IO::Path:D: Str $name --> Bool)
sub link(Str $target, Str $name --> Bool)
method link(IO::Path:D $target: IO() $link --> Bool:D)
sub link( IO() $target, IO() $link --> Bool:D)
Create a new link named as $target (or the name of the invocant in the
method form) to the existing file named C<$name>.
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.
Create a new I<hard> link C<$link> to existing C<$target>.
Returns C<True> on success; L<fails|/routine/fail> with
L<X::IO::Link> if the symbolic link could not be created.
To create a symbolic link, see L«C<symlink>|/routine/symlink».
=head2 routine unlink
Expand Down

0 comments on commit fff866f

Please sign in to comment.