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

Function append

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

Cross-platform path append that handles test paths consistently

(base: impl AsRef<Path>, path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

75
76/// Cross-platform path append that handles test paths consistently
77fn append(base: impl AsRef<Path>, path: impl AsRef<Path>) -> PathBuf {
78 #[cfg(test)]
79 {
80 // Normalize the path for tests, then use the platform-specific append
81 platform_append(normalize_test_path(base), normalize_test_path(path))
82 }
83
84 #[cfg(not(test))]
85 {
86 // In non-test code, just use the platform-specific append directly
87 platform_append(base, path)
88 }
89}
90
91#[derive(Debug, Clone)]
92pub enum Fs {

Callers 15

create_newMethod · 0.70
create_dirMethod · 0.70
create_dir_allMethod · 0.70
openMethod · 0.70
readMethod · 0.70
read_to_stringMethod · 0.70
read_to_string_syncMethod · 0.70
writeMethod · 0.70
remove_fileMethod · 0.70
remove_dir_allMethod · 0.70
renameMethod · 0.70
copyMethod · 0.70

Calls 1

normalize_test_pathFunction · 0.85

Tested by

no test coverage detected