class StartedMultiVolumeFilesystem
Defined at line 147 of file ../../src/storage/lib/fs_management/cpp/mount.h
Manages a started multi-volume filesystem instance (i.e. one started by
[`fuchsia.fs.startup.Start`]).
Public Methods
void StartedMultiVolumeFilesystem ()
Defined at line 149 of file ../../src/storage/lib/fs_management/cpp/mount.h
void StartedMultiVolumeFilesystem (fidl::ClientEnd<fuchsia_io::Directory> exposed_dir, fidl::ClientEnd<fuchsia_fs::Admin> admin)
Defined at line 150 of file ../../src/storage/lib/fs_management/cpp/mount.h
void StartedMultiVolumeFilesystem (StartedMultiVolumeFilesystem && o)
Defined at line 153 of file ../../src/storage/lib/fs_management/cpp/mount.h
void ~StartedMultiVolumeFilesystem ()
Defined at line 158 of file ../../src/storage/lib/fs_management/cpp/mount.cc
StartedMultiVolumeFilesystem & operator= (StartedMultiVolumeFilesystem && o)
Defined at line 159 of file ../../src/storage/lib/fs_management/cpp/mount.h
std::pair<fidl::ClientEnd<fuchsia_io::Directory>, std::map<std::string, fidl::ClientEnd<fuchsia_io::Directory>>> Release ()
Takes the filesystem connection and all volume connections, so the filesystem won't
automatically be shut down when this object goes out of scope. Some filesystems will
automatically shut down when the last connection to goes out of scope; others will never shut
down.
Defined at line 163 of file ../../src/storage/lib/fs_management/cpp/mount.cc
zx::result<> Unmount ()
Unmounts and shuts down the filesystem. Leaves this object in an indeterminate state.
Defined at line 175 of file ../../src/storage/lib/fs_management/cpp/mount.cc
const fidl::ClientEnd<fuchsia_io::Directory> & ServiceDirectory ()
Returns the connection to the service directory offered by the filesystem.
Defined at line 180 of file ../../src/storage/lib/fs_management/cpp/mount.h
zx::result<MountedVolume *> OpenVolume (std::string_view name, fuchsia_fs_startup::wire::MountOptions options)
Opens the volume if present. |options.crypt| is an optional connection to a crypt service used
to unlock the volume; if unset, the volume is assumed to be unencrypted.
Returns a pointer to the volume if it was opened. The lifetime of the pointer is less than
this object.
Defined at line 184 of file ../../src/storage/lib/fs_management/cpp/mount.cc
zx::result<MountedVolume *> CreateVolume (std::string_view name, fuchsia_fs_startup::wire::CreateOptions create_options, fuchsia_fs_startup::wire::MountOptions options)
Creates and mounts a volume. |options.crypt| is an optional connection to a crypt service used
to unlock the volume; if unset, the volume is assumed to be unencrypted.
Returns a pointer to the volume if it was created. The lifetime of the pointer is less than
this object.
Defined at line 199 of file ../../src/storage/lib/fs_management/cpp/mount.cc
const MountedVolume * GetVolume (const std::string & volume)
Returns a pointer to the given volume, if it is already open. The lifetime of the pointer is
less than this object.
Defined at line 213 of file ../../src/storage/lib/fs_management/cpp/mount.h
zx::result<> CheckVolume (std::string_view name, fidl::ClientEnd<fuchsia_fxfs::Crypt> crypt_client)
Verifies the integrity of a volume. |crypt_client| is an optional connection to a crypt
service used to unlock the volume. If |crypt_client| is not a valid handle, the volume is
assumed to be unencrypted.
Defined at line 225 of file ../../src/storage/lib/fs_management/cpp/mount.cc
zx::result<> RemoveVolume (std::string_view name)
Removes a volume.
Defined at line 216 of file ../../src/storage/lib/fs_management/cpp/mount.cc
bool HasVolume (std::string_view name)
Returns whether the given volume name exists.
Defined at line 230 of file ../../src/storage/lib/fs_management/cpp/mount.cc