pub fn resolve_uri(uri_path: &str, root: &Path) -> Result<PathBuf, Error>Expand description
Resolves the path from a URI against the path to a root directory.
This will return an error under the following conditions:
- Invalid path, not starting with a slash (/): results in
ErrorKind::InvalidInput - Resolved path outside the root directory: results in
ErrorKind::InvalidData std::fs::canonicalize()failed: results inErrorKind::NotFound,ErrorKind::PermissionDeniedand other errors