std:io/Files
std:io/Files
Section titled “std:io/Files”Canonical occurrence:
protos/lib/io/Files.protos· Protos revision:e99b712ecf658a527b1fe82c8beba2c1286d8dc9.
Whole-file convenience operations over an explicit Filesystem capability.
Observable top-level slots
Section titled “Observable top-level slots”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.
readAllBytes
Section titled “readAllBytes”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.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters:
filesystem,path -
Rest parameter: none
-
Source occurrence:
protos/lib/io/Files.protos:21 -
Exact source page: open in the source browser
readAllText
Section titled “readAllText”Answers a Future of the complete contents of the file at path decoded with
encoding after the whole file has been read.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters:
filesystem,path,encoding -
Rest parameter: none
-
Source occurrence:
protos/lib/io/Files.protos:175 -
Exact source page: open in the source browser
writeAllBytes
Section titled “writeAllBytes”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.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters:
filesystem,path,bytes -
Rest parameter: none
-
Source occurrence:
protos/lib/io/Files.protos:103 -
Exact source page: open in the source browser
writeAllText
Section titled “writeAllText”Encodes text with encoding synchronously and then writes it as by
writeAllBytes; an encoding failure signals before any Filesystem effect.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters:
filesystem,path,text,encoding -
Rest parameter: none
-
Source occurrence:
protos/lib/io/Files.protos:186 -
Exact source page: open in the source browser
Exact module source · Standard-library API · Standard library overview