Add FileTypeUnix trait to add unix special file types
This commit is contained in:
parent
afe25a2d6a
commit
74f42980e1
5 changed files with 34 additions and 2 deletions
|
@ -113,7 +113,7 @@ impl FileType {
|
|||
pub fn is_file(&self) -> bool { self.is(libc::S_IFREG) }
|
||||
pub fn is_symlink(&self) -> bool { self.is(libc::S_IFLNK) }
|
||||
|
||||
fn is(&self, mode: mode_t) -> bool { self.mode & libc::S_IFMT == mode }
|
||||
pub fn is(&self, mode: mode_t) -> bool { self.mode & libc::S_IFMT == mode }
|
||||
}
|
||||
|
||||
impl FromInner<raw::mode_t> for FilePermissions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue