1 2 3 4 5 6 7 8 9 10 11 12 13 14
#![cfg(feature = "server")] use std::fs::Metadata; use super::schema::PathSelector; impl PathSelector { pub fn accept(self, metadata: &Metadata) -> bool { match self { Self::BasePath => metadata.is_dir(), Self::FilePath => true, } } }