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]
fn path(&self) -> &Path
The full path that this entry represents.
fn path_is_symbolic_link(&self) -> bool
Whether this entry corresponds to a symbolic link or not.
fn is_stdin(&self) -> bool
Returns true if and only if this entry corresponds to stdin.
i.e., The entry has depth 0 and its file name is -
.
fn metadata(&self) -> Result<Metadata, Error>
Return the metadata for the file that this entry points to.
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.
fn file_name(&self) -> &OsStr
Return the file name of this entry.
If this entry has no file name (e.g., /
), then the full path is
returned.
fn depth(&self) -> usize
Returns the depth at which this entry was created relative to the root.
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.