scoop:scoop.platform:0.1.0
scoop.platform.io
API
-
class
BufferedSink
A synchronous buffered output adapter. Its ordinary constructor borrows the sink; takeOwnership transfers cleanup responsibility. Close flushes pending output and cleans up owned resources even if flushing fails.
-
class
BufferedSource
A synchronous read-ahead adapter. Its ordinary constructor borrows the source; takeOwnership transfers source cleanup responsibility. Operations on one adapter must not overlap.
-
interface
ByteSink
A synchronous byte sink supporting short writes and explicit flushing.
-
interface
ByteSource
A synchronous byte source supporting short reads. Zero for a positive-size request denotes EOF.
-
class
Pipe
A native pipe with independently owned read and write endpoints.
-
class
PipeSink
The owned write side of a native pipe.
-
class
PipeSource
The owned read side of a native pipe.
-
class
UnexpectedEofException
An exact-size read reached EOF before the requested byte count.
-
class
Utf8Writer
Adapts a borrowed byte sink to TextWriter without assuming close responsibility.
-
class
WriteZeroException
An exact-size write could not make progress.
-
function
copyTo
Copies input to a destination and returns actual bytes transferred. Byte-source copies borrow both endpoints; path copies own their temporary handles and honor replaceExisting.
-
function
duplicateStandardError
Returns a separately owned duplicate of standard error, which the caller must close.
-
function
duplicateStandardInput
Returns a separately owned duplicate of standard input, which the caller must close.
-
function
duplicateStandardOutput
Returns a separately owned duplicate of standard output, which the caller must close.
-
function
readAllBytes
Collects all remaining input into an independent byte array. Path overloads open and close their own file handle.
-
function
readFully
Reads exactly the requested count or throws UnexpectedEofException on premature EOF.
-
function
readInto
Reads into the selected writable buffer or array region, returning the actual byte count and allowing short reads.
-
function
readLine
Reads one UTF-8 line without its line ending, returning None when EOF occurs before any bytes.
-
function
readLineLossy
Reads one line with replacement for malformed UTF-8, returning None at empty EOF.
-
function
readText
Reads all remaining bytes and validates them as UTF-8.
-
function
readTextLossy
Reads all remaining bytes as UTF-8, replacing malformed sequences.
-
property
standardError
A borrowed view of the process standard error stream; it does not expose ownership of the process descriptor.
-
property
standardInput
A borrowed view of the process standard input stream; it does not expose ownership of the process descriptor.
-
property
standardOutput
A borrowed view of the process standard output stream; it does not expose ownership of the process descriptor.
-
function
writeAllBytes
Writes all supplied bytes. Path overloads create/open and close their own file handle, with explicit append selection.
-
function
writeFrom
Writes the selected readable buffer or array region, returning the accepted byte count and allowing short writes.
-
function
writeFully
Writes exactly the requested count or throws WriteZeroException when the sink makes no progress.
-
function
writeLine
Writes UTF-8 text followed by a newline.
-
function
writeText
Writes the complete UTF-8 encoding of the text without appending a newline.