pub fn file_path_absolute() -> Sanitizer<FilePath>Expand description
Sanitizer for file paths where absolute paths are acceptable.
Use for user-specified config files, log destinations, or paths
where the caller explicitly allows absolute paths but still needs
to block .. traversal.
§Rules
PathTraversalRule(absolute allowed) —..onlyControlCharRule— NUL, newline, ANSI escapes
§Example
use shell_sanitize_rules::presets;
let s = presets::file_path_absolute();
// Absolute path is allowed
assert!(s.sanitize("/etc/myapp/config.toml").is_ok());
// Traversal still blocked
assert!(s.sanitize("/etc/myapp/../../shadow").is_err());