MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_exists_file

Function test_exists_file

atomic-core/src/output/filesystem/tests.rs:99–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98#[test]
99fn test_exists_file() {
100 let (dir, fs) = temp_fs();
101 let path = dir.path().join("test.txt");
102 std::fs::write(&path, "content").unwrap();
103
104 assert!(fs.exists("test.txt"));
105 assert!(!fs.exists("nonexistent.txt"));
106}
107
108#[test]
109fn test_exists_directory() {

Callers

nothing calls this directly

Calls 4

temp_fsFunction · 0.85
writeFunction · 0.85
pathMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected