Skip to content

std:io/Files

Canonical occurrence: protos/lib/io/Files.protos · Protos revision: e99b712ecf658a527b1fe82c8beba2c1286d8dc9.

Whole-file convenience operations over an explicit Filesystem capability.

This page lists the complete mechanically observable top-level slot inventory required by D067. Authored documentation, when present, is canonical D062 prose; mechanical presence alone does not create a stability or compatibility promise.

Answers a Future of a fresh Bytes value with the complete contents of the file at path in filesystem. The file is opened and always closed by the operation.

Answers a Future of the complete contents of the file at path decoded with encoding after the whole file has been read.

Answers a Future that replaces the contents of the file at path in filesystem with a snapshot of bytes, creating or truncating it, and answers filesystem. The snapshot is taken synchronously; the file is always closed, and a failed write is not retried.

Encodes text with encoding synchronously and then writes it as by writeAllBytes; an encoding failure signals before any Filesystem effect.

Exact module source · Standard-library API · Standard library overview