/// This function will return an error under a number of different
/// circumstances. Some of these error conditions are listed here, together
/// with their [`io::ErrorKind`]. The mapping to [`io::ErrorKind`]s is not
- /// part of the compatibility contract of the function, especially the
- /// [`Other`] kind might change to more specific kinds in the future.
+ /// part of the compatibility contract of the function.
///
/// * [`NotFound`]: The specified file does not exist and neither `create`
/// or `create_new` is set.
/// exists.
/// * [`InvalidInput`]: Invalid combinations of open options (truncate
/// without write access, no access mode set, etc.).
- /// * [`Other`]: One of the directory components of the specified file path
+ ///
+ /// The following errors don't match any existing [`io::ErrorKind`] at the moment:
+ /// * One of the directory components of the specified file path
/// was not, in fact, a directory.
- /// * [`Other`]: Filesystem-level errors: full disk, write permission
+ /// * Filesystem-level errors: full disk, write permission
/// requested on a read-only file system, exceeded disk quota, too many
/// open files, too long filename, too many symbolic links in the
/// specified path (Unix-like systems only), etc.
/// [`AlreadyExists`]: io::ErrorKind::AlreadyExists
/// [`InvalidInput`]: io::ErrorKind::InvalidInput
/// [`NotFound`]: io::ErrorKind::NotFound
- /// [`Other`]: io::ErrorKind::Other
/// [`PermissionDenied`]: io::ErrorKind::PermissionDenied
#[stable(feature = "rust1", since = "1.0.0")]
pub fn open<P: AsRef<Path>>(&self, path: P) -> io::Result<File> {
Some(p) => self.create_dir_all(p)?,
None => {
return Err(io::Error::new_const(
- io::ErrorKind::Other,
+ io::ErrorKind::Uncategorized,
&"failed to create whole tree",
));
}