Struct photonio_uring::fs::File

source ·
pub struct File(_);
Expand description

A reference to an open file.

This type is an async version of std::fs::File.

Implementations

Opens a file in read-only mode.

See also std::fs::File::open.

Opens a file in write-only mode.

This function will create a file if it does not exist, and will truncate it if it does.

See also std::fs::File::create.

Returns the metadata about this file.

See also std::fs::File::metadata.

Truncates or extends the size of this file.

See also std::fs::File::set_len.

Synchronizes all modified data of this file to disk.

See also std::fs::File::sync_all.

This function is similiar to Self::sync_all, except that it might not synchronize metadata.

See also std::fs::File::sync_data.

Trait Implementations

Extracts the raw file descriptor. Read more
Formats the value using the given formatter. Read more
Constructs a new instance of Self from the given raw file descriptor. Read more
A future that resolves to the result of Self::read.
Reads some bytes from this object into buf. Read more
A future that resolves to the result of Self::read_at.
Reads some bytes from this object at pos into buf. Read more
A future that resolves to the result of Self::seek.
Seeks to a given position in this object. Read more
A future that resolves to the result of Self::write.
Writes some bytes from buf into this object. Read more
A future that resolves to the result of Self::write_at.
Writes some bytes from buf into this object at pos. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

A future that resolves to the result of Self::read_exact_at.
Reads the exact number of bytes from this object at pos to fill buf.
A future that resolves to the result of Self::read_exact.
Reads the exact number of bytes from this object to fill buf.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
A future that resolves to the result of Self::write_all_at.
Writes all bytes from buf into this object at pos.
A future that resolves to the result of Self::write_all.
Writes all bytes from buf into this object.