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)
| 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 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected