Lines Matching refs:io
30 use std::io;
78 fn expect_empty_deletable_directory(&self) -> io::Result<()> { in expect_empty_deletable_directory()
84 Err(io::Error::from_raw_os_error(libc::ENOTEMPTY)) in expect_empty_deletable_directory()
88 Err(io::Error::from_raw_os_error(libc::EACCES)) in expect_empty_deletable_directory()
90 _ => Err(io::Error::from_raw_os_error(libc::ENOTDIR)), in expect_empty_deletable_directory()
319 fn handle_inode<F, R>(&self, inode: &Inode, handle_fn: F) -> io::Result<R> in handle_inode()
321 F: FnOnce(&AuthFsEntry) -> io::Result<R>, in handle_inode()
341 ) -> io::Result<Inode> in create_new_entry_with_ref_count()
343 F: FnOnce(&mut AuthFsEntry, &Path, Inode) -> io::Result<AuthFsEntry>, in create_new_entry_with_ref_count()
368 ) -> io::Result<(Option<Handle>, FuseOpenOptions)> { in open_dir_store_snapshot()
380 fn check_access_mode(flags: u32, mode: libc::c_int) -> io::Result<()> { in check_access_mode()
384 Err(io::Error::from_raw_os_error(libc::EACCES)) in check_access_mode()
407 ) -> io::Result<libc::stat64> { in create_stat()
423 .map_err(|_| io::Error::from_raw_os_error(libc::EFBIG))?; in create_stat()
427 .map_err(|_| io::Error::from_raw_os_error(libc::EFBIG))?; in create_stat()
435 ) -> io::Result<libc::stat64> { in create_dir_stat()
451 .ok_or_else(|| io::Error::from_raw_os_error(libc::EOVERFLOW))? in create_dir_stat()
463 fn read_chunks<W: io::Write, T: ReadByChunk>( in read_chunks()
469 ) -> io::Result<usize> { in read_chunks()
482 return Err(io::Error::from_raw_os_error(libc::ENODATA)); in read_chunks()
489 return Err(io::Error::from_raw_os_error(libc::EIO)); in read_chunks()
507 fn init(&self, _capable: FsOptions) -> io::Result<FsOptions> { in init()
513 fn lookup(&self, _ctx: Context, parent: Inode, name: &CStr) -> io::Result<Entry> { in lookup()
521 dir.lookup_inode(path).ok_or_else(|| io::Error::from_raw_os_error(libc::ENOENT)) in lookup()
527 _ => Err(io::Error::from_raw_os_error(libc::ENOTDIR)), in lookup()
608 ) -> io::Result<(libc::stat64, Duration)> { in getattr()
640 ) -> io::Result<(Option<Self::Handle>, FuseOpenOptions)> { in open()
655 return Err(io::Error::from_raw_os_error(libc::ENOSYS)); in open()
673 ) -> io::Result<(Entry, Option<Self::Handle>, FuseOpenOptions)> { in create()
680 return Err(io::Error::from_raw_os_error(libc::EEXIST)); in create()
686 _ => Err(io::Error::from_raw_os_error(libc::EBADF)), in create()
704 fn read<W: io::Write + ZeroCopyWriter>( in read()
714 ) -> io::Result<usize> { in read()
730 Err(io::Error::from_raw_os_error(libc::EISDIR)) in read()
736 fn write<R: io::Read + ZeroCopyReader>( in write()
747 ) -> io::Result<usize> { in write()
755 Err(io::Error::from_raw_os_error(libc::EPERM)) in write()
758 Err(io::Error::from_raw_os_error(libc::EISDIR)) in write()
770 ) -> io::Result<(libc::stat64, Duration)> { in setattr()
796 return Err(io::Error::from_raw_os_error(libc::EISDIR)); in setattr()
811 _ => Err(io::Error::from_raw_os_error(libc::EPERM)), in setattr()
821 ) -> io::Result<GetxattrReply> { in getxattr()
829 return Err(io::Error::from_raw_os_error(libc::ENODATA)); in getxattr()
838 Err(io::Error::from_raw_os_error(libc::ERANGE)) in getxattr()
844 _ => Err(io::Error::from_raw_os_error(libc::ENODATA)), in getxattr()
857 ) -> io::Result<Entry> { in mkdir()
864 return Err(io::Error::from_raw_os_error(libc::EEXIST)); in mkdir()
871 Err(io::Error::from_raw_os_error(libc::EACCES)) in mkdir()
873 _ => Err(io::Error::from_raw_os_error(libc::EBADF)), in mkdir()
886 fn unlink(&self, _ctx: Context, parent: Self::Inode, name: &CStr) -> io::Result<()> { in unlink()
900 Err(io::Error::from_raw_os_error(libc::EACCES)) in unlink()
904 Err(io::Error::from_raw_os_error(libc::ENOSYS)) in unlink()
907 Err(io::Error::from_raw_os_error(libc::ENOTDIR)) in unlink()
913 fn rmdir(&self, _ctx: Context, parent: Self::Inode, name: &CStr) -> io::Result<()> { in rmdir()
926 Err(io::Error::from_raw_os_error(libc::EACCES)) in rmdir()
928 _ => Err(io::Error::from_raw_os_error(libc::ENOTDIR)), in rmdir()
953 ) -> io::Result<(Option<Self::Handle>, FuseOpenOptions)> { in opendir()
957 _ => Err(io::Error::from_raw_os_error(libc::ENOTDIR)), in opendir()
969 ) -> io::Result<Self::DirIter> { in readdir()
977 Err(io::Error::from_raw_os_error(libc::EBADF)) in readdir()
987 ) -> io::Result<()> { in releasedir()
995 fn statfs(&self, _ctx: Context, _inode: Self::Inode) -> io::Result<libc::statvfs64> { in statfs()
1026 ) -> io::Result<R> in handle_inode_locked()
1028 F: FnOnce(&InodeState) -> io::Result<R>, in handle_inode_locked()
1033 Err(io::Error::from_raw_os_error(libc::ENOENT)) in handle_inode_locked()
1041 ) -> io::Result<R> in handle_inode_mut_locked()
1043 F: FnOnce(&mut InodeState) -> io::Result<R>, in handle_inode_mut_locked()
1048 Err(io::Error::from_raw_os_error(libc::ENOENT)) in handle_inode_mut_locked()
1052 fn check_unsupported_setattr_request(valid: SetattrValid) -> io::Result<()> { in check_unsupported_setattr_request()
1055 return Err(io::Error::from_raw_os_error(libc::ENOSYS)); in check_unsupported_setattr_request()
1059 return Err(io::Error::from_raw_os_error(libc::ENOSYS)); in check_unsupported_setattr_request()