Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /tmp% raku -e 'use NativeCall; sub chdire(Str) is native is symbol("chdir") { * }; say "Raku-cwd: ", $*CWD; chdir(".."); say "Raku-cwd-afrer-chdir: ",$*CWD; sub getcwd(blob8, int32) is native { * }; my $blob = blob8.allocate(256,0); getcwd($blob, 255); say "C-cwd-after-chdir: ", $blob.decode()'
- Raku-cwd: "/private/tmp".IO
- Raku-cwd-afrer-chdir: "/private".IO
- C-cwd-after-chdir: /private/tmp
- /tmp% raku -e 'use NativeCall; sub C-chdir(Str) is native is symbol("chdir") { * }; say "Raku-cwd: ", $*CWD; C-chdir(".."); say "Raku-cwd-afrer-C-chdir: ",$*CWD; sub getcwd(blob8, int32) is native { * }; my $blob = blob8.allocate(256,0); getcwd($blob, 255); say "C-cwd-after-C-chdir: ", $blob.decode()'
- Raku-cwd: "/private/tmp".IO
- Raku-cwd-afrer-C-chdir: "/private/tmp".IO
- C-cwd-after-C-chdir: /private
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement