use std::fs;
use std::path::Path;
pub mod find;
pub mod copy;
pub fn exists(path: &Path) -> bool {
match fs::metadata(path) {
Ok(metadata) => !metadata.is_dir(),
_ => false,
}
}
#[cfg(test)]
mod tests {
use std::path::Path;
#[test]
fn exists() {
assert!(::exists(&Path::new("src/lib.rs")));
assert!(!::exists(&Path::new("src")));
}
}