#![deny(rust_2018_idioms, missing_docs)]
#![forbid(unsafe_code)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
pub struct Capabilities {
pub precompose_unicode: bool,
pub ignore_case: bool,
pub executable_bit: bool,
pub symlink: bool,
}
mod capabilities;
mod snapshot;
use std::path::PathBuf;
pub use snapshot::{FileSnapshot, SharedFileSnapshot, SharedFileSnapshotMut};
pub mod symlink;
pub mod dir;
#[derive(Clone)]
pub struct Stack {
root: PathBuf,
current: PathBuf,
current_relative: PathBuf,
valid_components: usize,
current_is_directory: bool,
}
#[cfg(unix)]
pub fn is_executable(metadata: &std::fs::Metadata) -> bool {
use std::os::unix::fs::MetadataExt;
(metadata.mode() & 0o100) != 0
}
#[cfg(not(unix))]
pub fn is_executable(_metadata: &std::fs::Metadata) -> bool {
false
}
pub mod stack;