Struct memofs::VfsLock[][src]

pub struct VfsLock<'a> { /* fields omitted */ }
Expand description

A locked handle to a Vfs, created by Vfs::lock.

Implements roughly the same API as Vfs.

Implementations

Turns automatic file watching on or off. Enabled by default.

Turning off file watching may be useful for single-use cases, especially on platforms like macOS where registering file watches has significant performance cost.

Read a file from the VFS, or the underlying backend if it isn’t resident.

Roughly equivalent to std::fs::read.

Write a file to the VFS and the underlying backend.

Roughly equivalent to std::fs::write.

Read all of the children of a directory.

Roughly equivalent to std::fs::read_dir.

Remove a file.

Roughly equivalent to std::fs::remove_file.

Remove a directory and all of its descendants.

Roughly equivalent to std::fs::remove_dir_all.

Query metadata about the given path.

Roughly equivalent to std::fs::metadata.

Retrieve a handle to the event receiver for this Vfs.

Commit an event to this Vfs.

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

Performs the conversion.

Performs the conversion.

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.