pub struct RootSet { /* private fields */ }Implementations§
Source§impl RootSet
impl RootSet
Sourcepub fn new(roots: &[String], agenda: &[String]) -> Result<Self, AgdError>
pub fn new(roots: &[String], agenda: &[String]) -> Result<Self, AgdError>
roots are the only directories agd may read or write; agenda
holds the agenda file patterns (files, directories or globs).
pub fn roots(&self) -> &[PathBuf]
pub fn contains(&self, path: &Path) -> bool
Sourcepub fn is_agenda_file(&self, canonical: &Path) -> Result<bool, AgdError>
pub fn is_agenda_file(&self, canonical: &Path) -> Result<bool, AgdError>
Whether discovery would list this canonical .org path as an agenda
file: an exact absolute entry, or a pattern matching it relative to
its root outside hidden directories (which the walk skips). Lets a
file created after the index loaded join it.
pub fn resolve_read(&self, requested: &Path) -> Result<PathBuf, AgdError>
pub fn resolve_write( &self, requested: &Path, create: bool, ) -> Result<PathBuf, AgdError>
Sourcepub fn agenda_files(&self) -> Result<OrgFiles, AgdError>
pub fn agenda_files(&self) -> Result<OrgFiles, AgdError>
The agenda files: every .org file under the roots that matches an
agenda pattern.
Sourcepub fn all_org_files(&self) -> Result<OrgFiles, AgdError>
pub fn all_org_files(&self) -> Result<OrgFiles, AgdError>
Every .org file under the roots, agenda file or not.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RootSet
impl RefUnwindSafe for RootSet
impl Send for RootSet
impl Sync for RootSet
impl Unpin for RootSet
impl UnsafeUnpin for RootSet
impl UnwindSafe for RootSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more