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 › 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 › 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 ...
The Mail Archive
mail-archive.com › perl6-all@perl.org › msg114335.html
Re: I need help with my run keeper
The :$CWD argument allows for explicit control over the base directory for relative paths, which is particularly useful in testing or when working with paths in different contexts. Sounds like if you do not put the path of your program in and it is not in the default path, that you can set ...
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 › routine › run
run | Raku Documentation
It is an error to run a thread that has already been started. See primary documentation in context for sub 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 = ...
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.
The Mail Archive
mail-archive.com › perl6-all@perl.org › msg114333.html
I need help with my run keeper
I am missing what run does with (not finding them in https://docs.raku.org/routine/run) :$cwd :$env :$arg0 and :$win-verbatim-args This is what I have so far: method new(Proc:U: :$in = '-', :$out = '-', :$err = '-', Bool :$bin = False, Bool :$chomp = True, Bool :$merge = False, Str:D :$enc = 'UTF-8', Str:D :$nl = "\n", --> Proc:D) sub run( *@args ($, *@), :$in = '-', # use `:$in`, `$:out`, and `:$err` arguments to redirect to # different file handle, thus creating a kind of pipe
Raku Documentation
docs.raku.org › routine › shell
shell | Raku Documentation
multi shell($cmd, :$in = '-', :$out = '-', :$err = '-', Bool :$bin, Bool :$chomp = True, Bool :$merge, Str :$enc, Str:D :$nl = "\n", :$cwd = $*CWD, :$env) Runs a command through the system shell, which defaults to %*ENV<ComSpec> /c in Windows, /bin/sh -c otherwise.
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-musings
raku-musings.com › rash3.html
Rash - A Raku Shell - Part 3: The Execution
See docs.raku.org/language/variables#index-entry-$*CWD for more information about $*CWD. (Note that it is possible to change it manually, even to illegal values.
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 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 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 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".