Struct include_dir::Dir [−][src]
pub struct Dir<'a> { /* fields omitted */ }
A directory entry.
Methods
impl<'a> Dir<'a>
[src]
impl<'a> Dir<'a>
pub fn path(&self) -> &'a Path
[src]
pub fn path(&self) -> &'a Path
Get the directory's path.
pub fn files(&self) -> &'a [File<'a>]
[src]
pub fn files(&self) -> &'a [File<'a>]
Get a list of the files in this directory.
pub fn dirs(&self) -> &'a [Dir<'a>]
[src]
pub fn dirs(&self) -> &'a [Dir<'a>]
Get a list of the sub-directories inside this directory.
pub fn contains<S: AsRef<Path>>(&self, path: S) -> bool
[src]
pub fn contains<S: AsRef<Path>>(&self, path: S) -> bool
Does this directory contain path
?
pub fn get_dir<S: AsRef<Path>>(&self, path: S) -> Option<Dir>
[src]
pub fn get_dir<S: AsRef<Path>>(&self, path: S) -> Option<Dir>
Fetch a sub-directory by exactly matching its path relative to the
directory included with include_dir!()
.
pub fn get_file<S: AsRef<Path>>(&self, path: S) -> Option<File>
[src]
pub fn get_file<S: AsRef<Path>>(&self, path: S) -> Option<File>
Fetch a sub-directory by exactly matching its path relative to the
directory included with include_dir!()
.
pub fn find(
&self,
glob: &str
) -> Result<impl Iterator<Item = DirEntry<'a>>, PatternError>
[src]
pub fn find(
&self,
glob: &str
) -> Result<impl Iterator<Item = DirEntry<'a>>, PatternError>
Search for a file or directory with a glob pattern.
Trait Implementations
impl<'a> Debug for Dir<'a>
[src]
impl<'a> Debug for Dir<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Copy for Dir<'a>
[src]
impl<'a> Copy for Dir<'a>
impl<'a> Clone for Dir<'a>
[src]
impl<'a> Clone for Dir<'a>
fn clone(&self) -> Dir<'a>
[src]
fn clone(&self) -> Dir<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a> PartialEq for Dir<'a>
[src]
impl<'a> PartialEq for Dir<'a>