]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/unix/fs.rs
Rename ErrorKind::Unknown to Uncategorized.
[rust.git] / library / std / src / sys / unix / fs.rs
index 79617aa77b7b211d91b1a91f4e55af42bbc746a1..a428ce94c8e8632ea00bbceab87abba334f471ee 100644 (file)
@@ -48,7 +48,7 @@
     dirent64, fstat64, ftruncate64, lseek64, lstat64, off64_t, open64, readdir64_r, stat64,
 };
 
-pub use crate::sys_common::fs::remove_dir_all;
+pub use crate::sys_common::fs::{remove_dir_all, try_exists};
 
 pub struct File(FileDesc);
 
@@ -358,7 +358,7 @@ pub fn created(&self) -> io::Result<SystemTime> {
                     }))
                 } else {
                     Err(io::Error::new_const(
-                        io::ErrorKind::Other,
+                        io::ErrorKind::Uncategorized,
                         &"creation time is not available for the filesystem",
                     ))
                 };
@@ -1329,7 +1329,7 @@ fn fclonefileat(
     Ok(bytes_copied as u64)
 }
 
-#[cfg(not(target_os = "fuchsia"))]
+#[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
 pub fn chroot(dir: &Path) -> io::Result<()> {
     let dir = cstr(dir)?;
     cvt(unsafe { libc::chroot(dir.as_ptr()) })?;