MCPcopy Create free account
hub / github.com/PLSysSec/wave / translate_path

Method translate_path

src/runtime.rs:206–219  ·  view source on GitHub ↗
(
        &self,
        path: SboxPtr,
        path_len: u32,
        should_follow: bool,
        dirfd: HostFd,
    )

Source from the content-addressed store, hash-verified

204 }
205 )]
206 pub fn translate_path(
207 &self,
208 path: SboxPtr,
209 path_len: u32,
210 should_follow: bool,
211 dirfd: HostFd,
212 ) -> RuntimeResult<HostPath> {
213 if !self.fits_in_lin_mem(path, path_len) {
214 return Err(Eoverflow);
215 }
216 let host_buffer = self.copy_buf_from_sandbox(path, path_len);
217 resolve_path(host_buffer, should_follow, dirfd)
218 // self.resolve_path(host_buffer)
219 }
220
221 pub fn get_homedir(&self) -> Vec<u8> {
222 string_to_vec_u8(&self.homedir)

Callers 10

wasi_path_openFunction · 0.80
wasi_path_filestat_getFunction · 0.80
wasi_path_linkFunction · 0.80
wasi_path_readlinkFunction · 0.80
wasi_path_renameFunction · 0.80
wasi_path_symlinkFunction · 0.80
wasi_path_unlink_fileFunction · 0.80

Calls 3

resolve_pathFunction · 0.85
fits_in_lin_memMethod · 0.80
copy_buf_from_sandboxMethod · 0.80

Tested by

no test coverage detected