pub fn ensure_directory(
path: &Path,
strategy: DirectoryCreationStrategy,
) -> Result<(), PathError>Expand description
Ensure the provided directory exists and is writable according to the chosen strategy.
If the directory exists, verifies it’s actually a directory and is writable.
If the directory doesn’t exist, behavior depends on strategy:
AutoCreate: Creates the directory (and parents)Disallow: Returns an error