pub struct Fs<S: 'static + LfsStorage> { /* private fields */ }

Implementations

Methods from Deref<Target = Filesystem<'static, S>>

Total number of blocks in the filesystem

Total number of bytes in the filesystem

Available number of unused blocks in the filesystem

Upstream littlefs documentation notes (on its “current size” function): “Result is best effort. If files share COW structures, the returned size may be larger than the filesystem actually is.”

So it would seem that there are at least the number of blocks returned by this method available, at any given time.

Available number of unused bytes in the filesystem

This is a lower bound, more may be available. First, more blocks may be available as explained in available_blocks. Second, files may be inlined.

Remove a file or directory.

Remove a file or directory.

TODO: This method fails if some println! calls are removed. Whyy?

Rename or move a file or directory.

Given a path, query the filesystem to get information about a file or directory.

To read user attributes, use Filesystem::attribute

Read attribute.

Remove attribute.

Set attribute.

Returns a pseudo-iterator over the entries within a directory.

This is unsafe since it can induce UB just like File::open.

Creates a new, empty directory at the provided path.

Recursively create a directory and all of its parent components if they are missing.

Read the entire contents of a file into a bytes vector.

Write a slice as the entire contents of a file.

This function will create a file if it does not exist, and will entirely replace its contents if it does.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

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.

Should always be Self

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.