Struct slos_filesystem::FilesystemBase [−][src]
pub struct FilesystemBase {
pub mountpoints: StaticCollection<UnsafeContainer<FilesystemMountpoint>>,
}
Expand description
Base structure for mounting filesystems to
Fields
mountpoints: StaticCollection<UnsafeContainer<FilesystemMountpoint>>
Collection of mounted filesystems
Implementations
Mount a filesystem root at path
.
Return an FsNode
for the given path
, if one exists.
If the given path
is exactly the root of a mounted filesystem, returns
the filesystem root object, casted to an FsNode
(so you can treat it
as a normal directory).
If the given path
is not the root of a mounted filesystem, traverses
the parent filesystem of the path to find the node at the path within
that filesystem.
Returns FsError::FileNotFound
if a node could not be found at the path,
or FsError::FilesystemRootError
if the parent filesystem of the path
was not able to be cast to an FsNode
(which would only ever happen if
mounting the filesystem failed spectactularly, or the mountpoint table had
been messed with).