Skip to main content

Module fs

Module fs 

Source
Expand description

Async filesystem I/O via io_uring.

Provides buffered file read/write and metadata operations (stat, rename, unlink, mkdir) using native io_uring opcodes — no blocking syscalls.

Structs§

File
Opaque handle to an opened file.
FsConfig
Configuration for async filesystem I/O.
Metadata
File metadata returned by stat().
OpenFlags
Flags for open().
OpenFuture
Future that resolves to a File handle when the open completes.
ReadFuture
Future returned by read_into().
StatFuture
Future that resolves to Metadata when the stat completes.
WriteFuture
Future returned by write_from().

Functions§

close
Close a file handle.
create
Create a file (shorthand for open with CREATE | WRITE | TRUNCATE, mode 0o644).
fsync
Fsync a file, flushing all data and metadata to disk.
mkdir
Create a directory.
open
Open a file asynchronously via io_uring.
read
Read from a file at the given offset.
read_into
Read from a file at the given offset into a BytesMut.
remove
Remove a file (unlink).
rename
Rename a file.
stat
Get file metadata (stat) for a path.
write
Write to a file at the given offset.
write_from
Write to a file at the given offset from a BytesMut.