Available on crate feature
fs only.Expand description
A handle to an opened file.
Structs§
- NSTD
File - A handle to an opened file.
Constants§
- NSTD_
FILE_ APPEND - Open a file in writing mode without overwriting saved data.
- NSTD_
FILE_ CREATE - Creates the file upon opening if it does not already exist.
- NSTD_
FILE_ READ - Open a file in read mode.
- NSTD_
FILE_ TRUNC - Open a file in truncate mode, this will set the file’s length to 0 upon opening.
- NSTD_
FILE_ WRITE - Open a file in write mode.
Functions§
- nstd_
fs_ file_ close - Closes a file handle.
- nstd_
fs_ file_ flush - Flushes a file stream.
- nstd_
fs_ ⚠file_ open - Opens file on the filesystem and returns a handle to it.
- nstd_
fs_ ⚠file_ read - Reads some data from an open file into a buffer.
- nstd_
fs_ file_ read_ all - Continuously reads data from
fileinto a buffer until EOF is reached. - nstd_
fs_ ⚠file_ read_ exact - Reads enough data from
fileto fill the entirety ofbuffer. - nstd_
fs_ file_ read_ to_ string - Continuously reads UTF-8 data from
fileinto a string buffer until EOF is reached. - nstd_
fs_ ⚠file_ write - Writes some data to a file & returns how many bytes were written.
- nstd_
fs_ ⚠file_ write_ all - Writes a whole buffer to a file.
Type Aliases§
- NSTD
File Result - A result type yielding an
NSTDFileon success.