Skip to main content

require_directory

Function require_directory 

Source
pub fn require_directory(path: impl AsRef<Path>) -> Result<PathBuf, PathError>
Expand description

Require that path exists and is a directory; return its path on success.

§Filesystem access

Yes. Follows symlinks for the directory check.

§Errors

Returns a contextual filesystem or invalid-path error when the path is missing, not a directory, or inaccessible.