Module nstd_sys::fs::file

source ·
Available on crate feature nstd_fs only.
Expand description

A handle to an opened file.

Constants

Open a file in writing mode without overwriting saved data.
Creates the file upon opening if it does not already exist.
Open a file in read mode.
Open a file in truncate mode, this will set the file’s length to 0 upon opening.
Open a file in write mode.

Functions

Closes a file handle.
Flushes a file stream.
Opens file on the filesystem and returns a handle to it.
Reads some data from an open file into a buffer.
Continuously reads data from file into a buffer until EOF is reached.
Reads enough data from file to fill the entirety of buffer.
Continuously reads UTF-8 data from file into a string buffer until EOF is reached.
Writes some data to a file & returns how many bytes were written.
Writes a whole buffer to a file.

Type Definitions

A handle to an opened file.
A result type yielding an NSTDFile on success.