Raku Documentation
docs.raku.org › language › io-guide
Input/Output the definitive guide | Raku Documentation
The two extra attributes—SPEC and CWD—specify what type of operating system semantics the path should use as well as the "current working directory" for the path, i.e. if it's a relative path, then it's relative to that directory. This means that regardless of how you made one, an IO::Path ...
Raku Documentation
docs.raku.org › type › IO::Path
class IO::Path | Raku Documentation
At creation, each IO::Path object is given information about the current working directory the path might be relative to using the $.CWD attribute (defaults to $*CWD), as well as what operating system semantics should be used for path manipulation using the special IO::Spec type given in the $.SPEC attribute.
Raku Documentation
docs.raku.org › routine › chdir
chdir | Raku Documentation
Returns IO::Path representing new $*CWD on success. On failure, returns Failure and leaves $*CWD untouched. The $path can be any object with an IO method that returns an IO::Path object. The available file tests are: ... By default, only :d test is performed.
Raku Documentation
docs.raku.org › language › independent-routines
Independent routines | Raku Documentation
Also creates parent directories, as needed (similar to *nix utility mkdir with -p option); that is, mkdir "foo/bar/ber/meow" will create foo, foo/bar, and foo/bar/ber directories if they do not exist, as well as foo/bar/ber/meow. ... Changes value of $*CWD variable to the provided $path, optionally ensuring the new path passes several file tests.
Raku Guide
raku.guide
Raku Guide
Notice that $*CWD returns the current working directory. Then we created a new Raku subroutine called hellofromc() that should act as a wrapper to its counterpart C function having the same name and residing in the C library found in LIBPATH. All of this was done by using the is native trait.
Raku Documentation
docs.raku.org › language › perl-func
Perl to Raku guide - functions | Raku Documentation
This is done this way, because there is no concept of a "default directory per OS thread". And since Raku does not fork, but only does threading, it was felt that the "current directory" concept should be in the $*CWD dynamic variable, which can be lexically scoped, and thus can be thread-safe.
Raku Documentation
docs.raku.org › routine › dir
dir | Raku Documentation
Since the tests are performed against Str arguments, not IO, the tests are executed in the $*CWD, instead of the target directory.
Raku Documentation
docs.raku.org › type › Proc
class Proc | Raku Documentation
If $merge is set to True, the standard output and error stream end up merged in $proc.out. ... When sunk, the Proc object will throw X::Proc::Unsuccessful if the process it ran exited unsuccessfully. ... shell 'ls /qqq'; # OUTPUT: # (exit code 1) ls: cannot access '/qqq': No such file or directory # The spawned command 'ls /qqq' exited unsuccessfully (exit code: 2) # in block <unit> at /tmp/3169qXElwq line 1 # ... method spawn(*@args ($, *@), :$cwd = $*CWD, Hash() :$env = %*ENV, :$arg0, :$win-verbatim-args = False --> Bool:D)
Raku
raku.land › zef:finanalyst › Collection
Raku Land - Collection
The main subroutine is collect. It requires a file config.raku to be in the $CWD (current working directory). In CRD the executable Raku-Doc initiates the collection by setting up sources and installing a config.raku file.
Raku Documentation
docs.raku.org › type › IO::Notification::Change
class IO::Notification::Change | Raku Documentation
Here is a small example that prints the first ten FileChanged-notifications for the current working directory: Raku highlighting · my $finish = Promise.new; my $count = 0; IO::Notification.watch-path($*CWD).act( -> $change { $count++ if $change.event ~~ FileChanged; say "($count) $change.path(): $change.event()"; $finish.keep if $count >= 10; }); await $finish; The type of the change is very much dependent both on the platform and on specific system calls that were used to initiate the change.
Raku
raku.github.io › Documentable › integration-test › type › IO::Path
class IO::Path
At creation, each IO::Path object is given information about the current working directory the path might be relative to using the $.CWD attribute (defaults to $*CWD), as well as what operating system semantics should be used for path manipulation using the special IO::Spec type given in the $.SPEC attribute.
Raku Documentation
docs.raku.org › routine › raku
raku | Raku Documentation
IO::Path::Win32.new("foo/bar").raku.say; # OUTPUT: IO::Path::Win32.new("foo/bar", :CWD("C:\\Users\\camelia")) Note that this string includes the value of the .CWD attribute that is set to $*CWD when the path object was created, by default.
The Mail Archive
mail-archive.com › perl6-all@perl.org › msg114408.html
Re: boo-boo in run docs?
I hope this helps you understand why there isn't a 'boo boo' in the documentation, and why what others have said is actually answering the question you asked. Regards, Richard (finanalyst) On 03/11/2025 08:03, ToddAndMargo via perl6-users wrote: Hi All, I do believe I came across a boo-boo in the docs for "run": https://docs.raku.org/routine/run sub run( *@args ($, *@), :$in = '-', :$out = '-', :$err = '-', Bool :$bin = False, Bool :$chomp = True, Bool :$merge = False, Str:D :$enc = 'UTF-8', Str:D :$nl = "\n", :$cwd = $*CWD, Hash() :$env = %*ENV, :$arg0, :$win-verbatim-args = False --> Proc:D) The above stated that it return a variable of type "Proc".
Raku Documentation
docs.raku.org › language › variables.html
Variables | Raku Documentation
is · supersede · Variables · $ $*ARGFILES · $*COLLATION · $*CWD · $*DEFAULT-READ-ELEMS · $*DISTRO · $*ERR · $*EXCEPTION · $*EXECUTABLE · $*EXECUTABLE-NAME · $*EXIT · $*GROUP · $*HOME · $*HOMEDRIVE · $*HOMEPATH · $*IN · $*INIT-INSTANT · $*KERNEL · $*OUT · $*PERL · $*PID · $*PROGRAM · $*PROGRAM-NAME · $*RAKU ·
Raku Advent Calendar
raku-advent.blog › 2022 › 12 › 02 › day-2-less-variable-wattage-more-flow
Day 2: Less Variable Wattage = More Flow – Raku Advent Calendar
December 2, 2022 - To get the gist of what the variable is: To see a variable’s contents call raku on it or pass it to the builtin data dumper function (dd): Why does a $*CWD variable work like that? Just ask WHY … · Or even HOW the variable works – it’s Higher Order Workings, can be accessed with ^ like so: Raku variables include everything you need to understand how to use them.
Raku
raku.github.io › Documentable › integration-test › routine › dir
routine dir
Returns the contents of a directory as a lazy list of IO::Path objects representing relative paths, filtered by smartmatching their names (as strings) against the :test parameter. The path of returned files will be absolute or relative depending on what $path is.
GitHub
github.com › Raku › roast › issues › 471
Bogus &*chdir tests · Issue #471 · Raku/roast
July 29, 2018 - The tests for &*chdir in 430ab897a make an incorrect assumption that qx`pwd`.chomp.IO would give process dir, but in reality that follows whatever $*CWD is set to. Don't immediately know how to see what the process dir is.
Published Sep 12, 2018