Expand description
A library to create “pseudo” file systems. These file systems are backed by in process callbacks. Examples are: component configuration, debug information or statistics.
Re-exports§
pub use common::CreationMode;
pub use object_request::ObjectRequest;
pub use object_request::ObjectRequestRef;
pub use object_request::ToObjectRequest;
pub use path::Path;
pub use ::name;
Modules§
- common
- Common utilities used by both directory and file traits.
- directory
- Module holding different kinds of pseudo directories and their building blocks.
- execution_
scope - Values of this type represent “execution scopes” used by the library to give fine grained control of the lifetimes of the tasks associated with particular connections. When a new connection is attached to a pseudo directory tree, an execution scope is provided. This scope is then used to start any tasks related to this connection. All connections opened as a result of operations on this first connection will also use the same scope, as well as any tasks related to those connections.
- file
- Module holding different kinds of files and their building blocks.
- node
- Implementation of a (limited) node connection.
- object_
request - path
- Type that represents a path in a file system. Objects of this type own a String that holds the
“full” path and provide an iterator that goes over individual components of the path. This
approach is used to allow passing the path string, from one
open()
method to the next, without the need to copy the path itself. - remote
- A node which forwards open requests to a remote fuchsia.io server.
- service
- Implementations of a service endpoint.
- symlink
- Server support for symbolic links.
- temp_
clone - test_
utils - Utilities used by tests in both file and directory modules.
- token_
registry - Implementation of
TokenRegistry
. - tree_
builder - A helper to build a tree of directory nodes. It is useful in case when a nested tree is
desired, with specific nodes to be inserted as the leafs of this tree. It is similar to the
functionality provided by the
vfs_macros::pseudo_directory!
macro, except that the macro expects the tree structure to be defined at compile time, while this helper allows the tree structure to be dynamic.
Macros§
- assert_
channel_ closed - assert_
close - assert_
event - assert_
get_ attr - assert_
get_ attr_ path - assert_
get_ attributes - assert_
get_ token - assert_
get_ token_ err - assert_
get_ vmo - assert_
get_ vmo_ err - assert_
link_ err - assert_
query - assert_
read - assert_
read_ at - assert_
read_ at_ err - assert_
read_ dirents - assert_
read_ dirents_ err - assert_
read_ dirents_ one_ listing - assert_
read_ dirents_ path_ one_ listing - assert_
read_ err - assert_
read_ fidl_ err_ closed - assert_
rename - assert_
rename_ err - assert_
rewind - Calls
rewind
on the providedproxy
, checking that the result status is Status::OK. - assert_
seek - assert_
truncate - assert_
truncate_ err - assert_
unlink - assert_
unlink_ err - assert_
vmo_ content - Wraps an
assert_vmo_content()
call, panicking with a descriptive error message for anyErr
return values. - assert_
watch - assert_
watch_ err - assert_
watcher_ one_ message_ watched_ events - assert_
write - assert_
write_ at - assert_
write_ at_ err - assert_
write_ err - assert_
write_ fidl_ err_ closed - attributes
- Helper for building
fio::NodeAttributes2
given
requestedattributes. Code will only run for
requested` attributes. - clone_
as_ directory_ assert_ err - clone_
as_ file_ assert_ err - clone_
get_ directory_ proxy_ assert_ ok - clone_
get_ proxy_ assert - clone_
get_ service_ proxy_ assert_ ok - clone_
get_ vmo_ file_ proxy_ assert_ err - clone_
get_ vmo_ file_ proxy_ assert_ ok - immutable_
attributes - Helper for building
fio::NodeAttributes2
given immutable attributes in
requestedCode will only run for
requestedattributes. Mutable attributes in
requested` are ignored. - open_
as_ directory_ assert_ err - open_
as_ file_ assert_ err - open_
as_ vmo_ file_ assert_ content - Opens the specified path as a VMO file and checks its content. Also see all the
assert_*
macros in../test_utils.rs
. - open_
get_ directory_ proxy_ assert_ ok - open_
get_ proxy_ assert - open_
get_ vmo_ file_ proxy_ assert_ ok - pseudo_
directory - Builds a pseudo directory using a simple DSL, potentially containing files and nested pseudo directories.
Traits§
- Protocols
Ext - Extends fio::Flags and fio::OpenFlags
Functions§
- serve_
directory - Helper function to serve a new connection to the directory at
path
underroot
withflags
. Errors will be communicated via epitaph on the returned proxy. A newExecutionScope
will be created for the request. - serve_
file - Helper function to serve a new connection to the file at
path
underroot
withflags
. Errors will be communicated via epitaph on the returned proxy. A newExecutionScope
will be created for the request.