MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / chroot_path

Method chroot_path

crates/chat-cli/src/os/fs/mod.rs:435–440  ·  view source on GitHub ↗

For test [Fs]'s that use a different root, returns an absolute path. This must be used for any paths indirectly used by code using a chroot [Fs].

(&self, path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

433 /// This must be used for any paths indirectly used by code using a chroot
434 /// [Fs].
435 pub fn chroot_path(&self, path: impl AsRef<Path>) -> PathBuf {
436 match self {
437 Self::Chroot(root) => append(root.path(), path),
438 _ => path.as_ref().to_path_buf(),
439 }
440 }
441
442 /// See [Fs::chroot_path].
443 pub fn chroot_path_str(&self, path: impl AsRef<Path>) -> String {

Callers 3

sanitize_path_tool_argFunction · 0.80
home_dirFunction · 0.80

Calls 3

appendFunction · 0.70
pathMethod · 0.45
as_refMethod · 0.45

Tested by 1