pub(crate) fn new_vmo_file(vmo: Vmo) -> Result<Arc<dyn DirectoryEntry>, Error>
Expand description

Creates and returns a Rust VFS VmoFile-backed file using the contents of the given buffer.

The VMO backing the buffer is duplicated so that tests can ensure the same VMO is returned by subsequent GetBackingMemory calls.