Expand description
Async file-system operations built on the tempest_io::Io trait.
Each operation is a Future that submits a request to the I/O backend on first poll and
resolves when the completion arrives. Partial operations (read_exact, write_exact)
retry automatically until the full buffer is transferred.
Structs§
- Close
File - Future that closes a file descriptor.
- Open
File - Future that opens a file and resolves to its file descriptor.
- ReadAt
- Future that reads from a file at a given offset, resolving to
(bytes_read, buf). - Read
Exact - Future that reads exactly
buf.bytes_total()bytes from a file, retrying on partial reads. - Remove
File - Future that removes a file at a given path.
- Stat
File - Future that retrieves file metadata, resolving to
Io::Statx. - Sync
File - Future that fsyncs a file descriptor, ensuring data is flushed to storage.
- WriteAt
- Future that writes to a file at a given offset, resolving to
(bytes_written, buf). - Write
Exact - Future that writes exactly
buf.bytes_init()bytes to a file, retrying on partial writes.
Functions§
- close_
file - Closes
fd, releasing the underlying resource. - list_
dir - Lists all entries in
dir, returning them as aVec<DirEntry>. - open_
file - Opens
pathwith the givenOpenOptions, returning the file descriptor on success. - read_at
- Reads from
fdintobufatoffset. Returns(bytes_read, buf). - read_
exact - Reads exactly
buf.bytes_total()bytes fromfdatoffset, retrying on partial reads. Returns(Ok(()), buf)on success, or(Err(e), buf)on I/O error. - remove_
file - Removes the file at
path. - stat_
file - Retrieves metadata for
fd, resolving to the platform-specific statx structure. - sync_
file - Issues an fsync on
fd, resolving when the kernel confirms the flush. - write_
at - Writes
buftofdatoffset. Returns(bytes_written, buf). - write_
exact - Writes exactly
buf.bytes_init()bytes frombuftofdatoffset, retrying on partials. Returns(Ok(()), buf)on success, or(Err(e), buf)on I/O error.