The copy routine

Combined from primary sources listed below.

In class IO::Path ( Type/IO/Path )§

See primary docmentation in context for routine copy.

routine copy§

method copy(IO::Path:D: IO() $to, :$createonly --> Bool:D)
sub    copy(IO() $from, IO() $to, :$createonly --> Bool:D)

Copies a file. Returns True on success; fails with X::IO::Copy if :$createonly is True and the $to path already exists or if the operation failed for some other reason, such as when $to and $from are the same file.

In class Parameter ( Type/Parameter )§

See primary docmentation in context for method copy.

method copy§

method copy(Parameter:D: --> Bool:D)

Returns True for is copy parameters.

my Signature $sig = :(Str $x, Bool :$is-named is copy);
say $sig.params[0].copy;                           # OUTPUT: «False␤»
say $sig.params[1].copy;                           # OUTPUT: «True␤»