/// Check if requested resource is under directory of basepath.
///
/// The given path must be resolved (canonicalized) to eliminate
/// incorrect path reported by symlink path.
Check if requested resource is under directory of basepath.
The given path must be resolved (canonicalized) to eliminate
incorrect path reported by symlink path.
Check if requested resource is under directory of basepath . The given path must be resolved ( canonicalized ) to eliminate incorrect path reported by symlink path .
fn path_is_under_basepath<P: AsRef<Path>>(&self, path: P) -> bool {
        let path = path.as_ref();
        match path.canonicalize() {
            Ok(path) => path.starts_with(&self.args.path),
            Err(_) => false,
        }
    }
fn path_is_under_basepath < P : AsRef < Path > > ( & self , path : P ) -> bool { let path = path . as_ref ( ) ; match path . canonicalize ( ) { Ok ( path ) => path . starts_with ( & self . args . path ) , Err ( _ ) => false , } }
Check if requested resource is under directory of basepath.
Check if requested resource is under directory of basepath .
&self
path
P