Struct ignore::DirEntry [−][src]
pub struct DirEntry { /* fields omitted */ }A directory entry with a possible error attached.
The error typically refers to a problem parsing ignore files in a particular directory.
Methods
impl DirEntry[src]
impl DirEntrypub fn path(&self) -> &Path[src]
pub fn path(&self) -> &PathThe full path that this entry represents.
pub fn into_path(self) -> PathBuf[src]
pub fn into_path(self) -> PathBufThe full path that this entry represents.
Analogous to path, but moves ownership of the path.
pub fn path_is_symlink(&self) -> bool[src]
pub fn path_is_symlink(&self) -> boolWhether this entry corresponds to a symbolic link or not.
pub fn is_stdin(&self) -> bool[src]
pub fn is_stdin(&self) -> boolReturns true if and only if this entry corresponds to stdin.
i.e., The entry has depth 0 and its file name is -.
pub fn metadata(&self) -> Result<Metadata, Error>[src]
pub fn metadata(&self) -> Result<Metadata, Error>Return the metadata for the file that this entry points to.
pub fn file_type(&self) -> Option<FileType>[src]
pub fn file_type(&self) -> Option<FileType>Return the file type for the file that this entry points to.
This entry doesn't have a file type if it corresponds to stdin.
pub fn file_name(&self) -> &OsStr[src]
pub fn file_name(&self) -> &OsStrReturn the file name of this entry.
If this entry has no file name (e.g., /), then the full path is
returned.
pub fn depth(&self) -> usize[src]
pub fn depth(&self) -> usizeReturns the depth at which this entry was created relative to the root.
pub fn ino(&self) -> Option<u64>[src]
pub fn ino(&self) -> Option<u64>Returns the underlying inode number if one exists.
If this entry doesn't have an inode number, then None is returned.
pub fn error(&self) -> Option<&Error>[src]
pub fn error(&self) -> Option<&Error>Returns an error, if one exists, associated with processing this entry.
An example of an error is one that occurred while parsing an ignore file. Errors related to traversing a directory tree itself are reported as part of yielding the directory entry, and not with this method.
Trait Implementations
impl Clone for DirEntry[src]
impl Clone for DirEntryfn clone(&self) -> DirEntry[src]
fn clone(&self) -> DirEntryReturns 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)Performs copy-assignment from source. Read more
impl Debug for DirEntry[src]
impl Debug for DirEntry