stat(&self.path()).map(|m| m.file_type())
}
- #[cfg(not(target_os = "solaris"))]
+ #[cfg(target_os = "haiku")]
+ pub fn file_type(&self) -> io::Result<FileType> {
+ lstat(&self.path()).map(|m| m.file_type())
+ }
+
+ #[cfg(not(any(target_os = "solaris", target_os = "haiku")))]
pub fn file_type(&self) -> io::Result<FileType> {
match self.entry.d_type {
libc::DT_CHR => Ok(FileType { mode: libc::S_IFCHR }),
target_os = "linux",
target_os = "emscripten",
target_os = "android",
- target_os = "solaris"))]
+ target_os = "solaris",
+ target_os = "haiku"))]
pub fn ino(&self) -> u64 {
self.entry.d_ino as u64
}
}
#[cfg(any(target_os = "android",
target_os = "linux",
- target_os = "emscripten"))]
+ target_os = "emscripten",
+ target_os = "haiku"))]
fn name_bytes(&self) -> &[u8] {
unsafe {
CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes()