Expand description
§Resource Obliteration and Unmount Management
This crate provides a robust mechanism for force-removing directory trees on Linux systems. Unlike standard removal functions, it is designed to handle complex scenarios such as nested mount points and restrictive file permissions.
§Key Features
- Recursive Obliteration: Force-removes files and directories even if they lack write permissions by dynamically adjusting file modes.
- Mount-Point Detection: Automatically identifies and lazily unmounts filesystems nested within the target path to prevent data corruption or orphaned mounts.
- Safety Guards: Prevents dangerous operations, such as attempting to delete
parent directories (
..) or invalid path components. - Stack Safety: Utilizes stack growth management to handle extremely deep directory structures without triggering stack overflows.
Enums§
- Error
- Re-exports errors. Represents the possible errors encountered during resource deconstruction.
Functions§
- ensure_
removed - Re-exports high-level functions for file and directory removal.
Idempotent version of
remove, succeeding even if the target does not exist. - remove
- Re-exports high-level functions for file and directory removal. Force-removes a file or directory and all its descendants.