copy
ErrorsCollection

copy

Synthesised documentation from type/IO/Path type/Parameter

From type/IO/Path

See Original text in context

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

Copies a file. Returns True on success; fail 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.

From type/Parameter

See Original text in context

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

Returns True for trait parameters.

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