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

Method new

crates/chat-cli/src/os/fs/mod.rs:101–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99
100impl Fs {
101 pub fn new() -> Self {
102 match cfg!(test) && !is_integ_test() {
103 true => {
104 let tempdir = tempfile::tempdir().expect("failed creating temporary directory");
105 let fs = Self::Chroot(tempdir.into());
106 futures::executor::block_on(fs.create_dir_all(ACTIVE_USER_HOME))
107 .expect("failed to create test user home");
108
109 fs
110 },
111 false => Self::Real,
112 }
113 }
114
115 pub fn is_chroot(&self) -> bool {
116 matches!(self, Self::Chroot(_))

Callers

nothing calls this directly

Calls 2

create_dir_allMethod · 0.80
is_integ_testFunction · 0.50

Tested by

no test coverage detected