spurt
ErrorsCollection

spurt

Synthesised documentation from type/independent-routines type/IO/Path type/IO/Handle

From type/independent-routines

See Original text in context

multi spurt(IO() $path|c)

The $path can be any object with an IO method that returns an IO::Path object. Calls IO::Path.spurt on the $path, forwarding any of the remaining arguments.

From type/IO/Path

See Original text in context

method spurt(IO::Path:D: $data:$enc:$append:$createonly)

Opens the path for writing, and writes all of the $data into it. File will be closed afterwards. Will fail if it cannot succeed for any reason. The $data can be any Cool type or any Blob type. Arguments are as follows:

From type/IO/Handle

See Original text in context

multi method spurt(IO::Handle:D: Blob $data:$close = False)
multi method spurt(IO::Handle:D: Cool $data:$close = False)

Writes all of the $data into the filehandle, closing it when finished, if $close is True. For Cool $data, will use the encoding the handle is set to use (open or IO::Handle.encoding).

Behavior for spurting a Cool when the handle is in binary mode or spurting a Blob when the handle is NOT in binary mode is undefined.