You can create a symlink in Perl 6:
my $symlink-path = ...;
$target.symlink: $symlink-path;
Given just the symlink how can you get the target path?
$symlink-path.IO.????
I'm looking for the exact string that is the target, not any interpretation of that (such as .resolve
).
There is no equivalent in Perl 6 for that to my knowledge.
The closest thing to a solution, is to zef install P5readlink
(https://modules.raku.org/dist/P5readlink) and use readlink
like you would in Perl 5.
Method resolve works:
my $target = "../tmp/file".IO;
my $symlink-path = "files".IO;
$target.symlink: $symlink-path;
say $symlink-path.resolve;
say $symlink-path.resolve(:completely) ~~ $target.resolve(:completely);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With