Struct webc::wasmer_package::Volume
source · pub struct Volume { /* private fields */ }
Expand description
A lazily loaded volume in a Wasmer package.
Note that it is the package resolver’s role to interpret a package’s
crate::metadata::annotations::FileSystemMappings
. A Volume
contains
directories as they were when the package was published.
Implementations§
source§impl Volume
impl Volume
sourcepub fn read_file(&self, path: &PathSegments) -> Option<OwnedBuffer>
pub fn read_file(&self, path: &PathSegments) -> Option<OwnedBuffer>
Read a file from the volume.
sourcepub fn read_dir(
&self,
path: &PathSegments
) -> Option<Vec<(PathSegment, Metadata)>>
pub fn read_dir( &self, path: &PathSegments ) -> Option<Vec<(PathSegment, Metadata)>>
Read the contents of a directory.
sourcepub fn metadata(&self, path: &PathSegments) -> Option<Metadata>
pub fn metadata(&self, path: &PathSegments) -> Option<Metadata>
Get the metadata for a particular item.