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

Method new

atomic-cli/src/commands/clone/helpers.rs:259–264  ·  view source on GitHub ↗

Create a new cleanup guard for the given path. # Arguments `path` - The path to clean up on drop # Returns A new `CleanupGuard` with cleanup enabled. # Example ```rust use atomic::commands::clone::helpers::CleanupGuard; use std::path::PathBuf; let guard = CleanupGuard::new(PathBuf::from("/tmp/test-repo")); assert!(!guard.is_disabled()); ```

(path: PathBuf)

Source from the content-addressed store, hash-verified

257 /// assert!(!guard.is_disabled());
258 /// ```
259 pub fn new(path: PathBuf) -> Self {
260 Self {
261 path,
262 enabled: true,
263 }
264 }
265
266 /// Disable cleanup.
267 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected