Lines Matching +full:write +full:- +full:error
1 use std::error::Error as StdError;
18 Write, enumerator
40 /// Contains an IO error that has a file path attached.
43 /// another IO error.
45 pub(crate) struct Error { struct
47 source: io::Error, argument
51 impl Error { impl
52 pub fn build(source: io::Error, kind: ErrorKind, path: impl Into<PathBuf>) -> io::Error { in build() argument
53 io::Error::new( in build()
64 impl fmt::Display for Error { implementation
65 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
71 OpenFile => write!(formatter, "failed to open file `{}`", path), in fmt()
72 CreateFile => write!(formatter, "failed to create file `{}`", path), in fmt()
73 CreateDir => write!(formatter, "failed to create directory `{}`", path), in fmt()
74 SyncFile => write!(formatter, "failed to sync file `{}`", path), in fmt()
75 SetLen => write!(formatter, "failed to set length of file `{}`", path), in fmt()
76 Metadata => write!(formatter, "failed to query metadata of file `{}`", path), in fmt()
77 Clone => write!(formatter, "failed to clone handle for file `{}`", path), in fmt()
78 SetPermissions => write!(formatter, "failed to set permissions for file `{}`", path), in fmt()
79 Read => write!(formatter, "failed to read from file `{}`", path), in fmt()
80 Seek => write!(formatter, "failed to seek in file `{}`", path), in fmt()
81 Write => write!(formatter, "failed to write to file `{}`", path), in fmt()
82 Flush => write!(formatter, "failed to flush file `{}`", path), in fmt()
83 ReadDir => write!(formatter, "failed to read directory `{}`", path), in fmt()
84 RemoveFile => write!(formatter, "failed to remove file `{}`", path), in fmt()
85 RemoveDir => write!(formatter, "failed to remove directory `{}`", path), in fmt()
86 Canonicalize => write!(formatter, "failed to canonicalize path `{}`", path), in fmt()
87 ReadLink => write!(formatter, "failed to read symbolic link `{}`", path), in fmt()
88 SymlinkMetadata => write!(formatter, "failed to query metadata of symlink `{}`", path), in fmt()
89 FileExists => write!(formatter, "failed to check file existance `{}`", path), in fmt()
92 SeekRead => write!(formatter, "failed to seek and read from `{}`", path), in fmt()
94 SeekWrite => write!(formatter, "failed to seek and write to `{}`", path), in fmt()
97 ReadAt => write!(formatter, "failed to read with offset from `{}`", path), in fmt()
99 WriteAt => write!(formatter, "failed to write with offset to `{}`", path), in fmt()
104 impl StdError for Error { implementation
105 fn cause(&self) -> Option<&dyn StdError> { in cause()
109 fn source(&self) -> Option<&(dyn StdError + 'static)> { in source()
130 /// Error type used by functions like `fs::copy` that holds two paths.
134 source: io::Error,
141 source: io::Error, in build() argument
145 ) -> io::Error { in build() argument
146 io::Error::new( in build()
159 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
164 write!(formatter, "failed to copy file from {} to {}", from, to) in fmt()
167 write!(formatter, "failed to hardlink file from {} to {}", from, to) in fmt()
170 write!(formatter, "failed to rename file from {} to {}", from, to) in fmt()
173 write!(formatter, "failed to softlink file from {} to {}", from, to) in fmt()
178 write!(formatter, "failed to symlink file from {} to {}", from, to) in fmt()
183 write!(formatter, "failed to symlink file from {} to {}", from, to) in fmt()
187 write!(formatter, "failed to symlink dir from {} to {}", from, to) in fmt()
194 fn cause(&self) -> Option<&dyn StdError> { in cause()
198 fn source(&self) -> Option<&(dyn StdError + 'static)> { in source()