Lines Matching refs:io

21 use std::io;
82 ) -> io::Result<(VerifiedFileEditor<RemoteFileEditor>, Attr)> { in create_file()
85 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in create_file()
105 ) -> io::Result<(RemoteDirEditor, Attr)> { in mkdir()
108 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in mkdir()
121 pub fn delete_file(&mut self, basename: &Path) -> io::Result<Inode> { in delete_file()
125 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in delete_file()
135 pub fn force_delete_directory(&mut self, basename: &Path) -> io::Result<Inode> { in force_delete_directory()
139 basename.to_str().ok_or_else(|| io::Error::from_raw_os_error(libc::EINVAL))?; in force_delete_directory()
149 pub fn find_inode(&self, name: &Path) -> io::Result<Inode> { in find_inode()
153 .ok_or_else(|| io::Error::from_raw_os_error(libc::ENOENT)) in find_inode()
161 pub fn retrieve_entries(&self) -> io::Result<Vec<AuthFsDirEntry>> { in retrieve_entries()
167 .collect::<io::Result<Vec<_>>>() in retrieve_entries()
170 fn force_delete_entry(&mut self, basename: &Path, expect_dir: bool) -> io::Result<Inode> { in force_delete_entry()
176 (true, false) => Err(io::Error::from_raw_os_error(libc::ENOTDIR)), in force_delete_entry()
177 (false, true) => Err(io::Error::from_raw_os_error(libc::EISDIR)), in force_delete_entry()
185 Err(io::Error::from_raw_os_error(libc::ENOENT)) in force_delete_entry()
189 fn validate_arguments(&self, basename: &Path, mode: u32) -> io::Result<u32> { in validate_arguments()
194 return Err(io::Error::from_raw_os_error(libc::EEXIST)); in validate_arguments()
198 return Err(io::Error::from_raw_os_error(libc::EMLINK)); in validate_arguments()
222 pub fn add_dir(&mut self, basename: &Path, inode: Inode) -> io::Result<()> { in add_dir()
228 pub fn add_file(&mut self, basename: &Path, inode: Inode) -> io::Result<()> { in add_file()
232 fn add_entry(&mut self, basename: &Path, dir_entry: InodeInfo) -> io::Result<()> { in add_entry()
235 return Err(io::Error::from_raw_os_error(libc::EMLINK)); in add_entry()
242 Err(io::Error::from_raw_os_error(libc::EEXIST)) in add_entry()
251 pub fn retrieve_entries(&self) -> io::Result<Vec<AuthFsDirEntry>> { in retrieve_entries()
257 .collect::<io::Result<Vec<_>>>() in retrieve_entries()
261 fn path_to_cstring(path: &Path) -> io::Result<CString> { in path_to_cstring()
263 CString::new(bytes).map_err(|_| io::Error::from_raw_os_error(libc::EILSEQ)) in path_to_cstring()
266 fn into_io_error(e: VirtFdServiceStatus) -> io::Error { in into_io_error()
269 io::Error::from_raw_os_error(maybe_errno) in into_io_error()
271 io::Error::new(io::ErrorKind::Other, e.get_description()) in into_io_error()