template <typename Storage>
class BootfsView
Defined at line 195 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
BootfsView gives a storage-abstracted, "error-checking view" into a BOOTFS
payload.
BootfsView's semantics are nearly identical to that of View: see
<lib
/zbitl/view.h> for more detail.
Public Methods
void BootfsView<Storage> ()
Defined at line 394 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
void BootfsView<Storage> (const BootfsView<Storage> & other)
Defined at line 396 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
BootfsView<Storage> & operator= (const BootfsView<Storage> & other)
Defined at line 397 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
void BootfsView<Storage> (BootfsView<Storage> && other)
This is almost the same as the default move behavior. But it also
explicitly resets the moved-from error state to kUnused so that the
moved-from BootfsView can be destroyed without checking it.
Defined at line 409 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
BootfsView<Storage> & operator= (BootfsView<Storage> && other)
Defined at line 411 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
const storage_type & storage ()
Trivial accessor for the underlying Storage object. This must not be
called on a default-constructed view.
Defined at line 422 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
fit::result<Error> take_error ()
Check the container for errors after using iterators. When begin() or
iterator::operator++() encounters an error, it simply returns end() so
that loops terminate normally. Thereafter, take_error() must be called
to check whether the loop terminated because it iterated past the last
item or because it encountered an error. Once begin() has been called,
take_error() must be called before the BootfsView is destroyed, so no
error goes undetected. After take_error() is called the error state is
consumed and take_error() cannot be called again until another begin() or
iterator::operator++() call has been made.
Defined at line 436 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
void ignore_error ()
If you explicitly don't care about any error that might have terminated
the last loop early, then call ignore_error() instead of take_error().
Defined at line 449 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
std::string_view directory ()
The directory namespace that this view is limited to. There is no trailing
'/' and the value is empty if the namespace is the root one.
Defined at line 453 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
iterator begin ()
Defined at line 460 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
iterator end ()
Defined at line 465 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
fit::result<Error, BootfsView<Storage>> subdir (std::string_view name)
Gives a subdirectory view of the current directory. BOOTFS filesystem.
The provided name is a relative path: it may be empty, which corresponds
to the current directory, and may optionally include a trailing forward
slash. This method does not affect the current error state.
Defined at line 471 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
fit::result<Error, BootfsView<Storage>> subdir (std::string_view name)
Gives a subdirectory view of the current directory. BOOTFS filesystem.
The provided name is a relative path: it may be empty, which corresponds
to the current directory, and may optionally include a trailing forward
slash. This method does not affect the current error state.
Defined at line 471 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
iterator find (std::initializer_list<std::string_view> path_parts)
Looks up a file by a decomposition of its path. If joining the parts with
separators (i.e., '/') matches the path of an entry, an iterator pointing
to that entry is returned; else, end() is. The path parts are expected to
be given according to directory hierarchy (so that parent directories are
given first). Individual parts must be nonempty, and may contain
separators themselves, but not at the beginning or end.
Like begin(), find() resets the internal error state and it is the
responsibility of the caller to take or ignore that error before calling
this method. end() is returned if there is no match or an error occurred
during iteration.
Defined at line 519 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
iterator find (std::initializer_list<std::string_view> path_parts)
Looks up a file by a decomposition of its path. If joining the parts with
separators (i.e., '/') matches the path of an entry, an iterator pointing
to that entry is returned; else, end() is. The path parts are expected to
be given according to directory hierarchy (so that parent directories are
given first). Individual parts must be nonempty, and may contain
separators themselves, but not at the beginning or end.
Like begin(), find() resets the internal error state and it is the
responsibility of the caller to take or ignore that error before calling
this method. end() is returned if there is no match or an error occurred
during iteration.
Defined at line 519 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
iterator find (std::string_view filename)
Similar to the above, though with the whole path provided.
Defined at line 530 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
iterator find (std::string_view filename)
Similar to the above, though with the whole path provided.
Defined at line 530 of file ../../src/lib/zbitl/include/lib/zbitl/items/bootfs.h
Records
Friends
template <typename StorageType>
class Bootfs