Trait Filesystem
Source pub trait Filesystem {
Show 37 methods
// Provided methods
fn metadata(&self, _path: &Path) -> Result<FileStat> { ... }
fn read_link(&self, _path: &Path) -> Result<&OsStr> { ... }
fn create_dir(&mut self, _path: &Path, _mode: Mode) -> Result<()> { ... }
fn remove_file(&mut self, _path: &Path) -> Result<()> { ... }
fn remove_dir(&mut self, _path: &Path) -> Result<()> { ... }
fn symlink(&mut self, _src: &Path, _dst: &Path) -> Result<()> { ... }
fn rename(&mut self, _from: &Path, _to: &Path) -> Result<()> { ... }
fn hard_link(&mut self, _src: &Path, _dst: &Path) -> Result<()> { ... }
fn set_permissions(&mut self, _path: &Path, _mode: Mode) -> Result<()> { ... }
fn set_owner(&mut self, _path: &Path, _uid: Uid, _gid: Gid) -> Result<()> { ... }
fn set_len(&mut self, _path: &Path, _len: u64) -> Result<()> { ... }
fn open(
&mut self,
_path: &Path,
_file_info: &mut OpenFileInfo,
) -> Result<()> { ... }
fn read(
&mut self,
_path: &Path,
_buf: &mut [u8],
_offset: u64,
_file_info: FileInfo,
) -> Result<usize> { ... }
fn write(
&mut self,
_path: &Path,
_buf: &[u8],
_offset: u64,
_file_info: &mut WriteFileInfo,
) -> Result<usize> { ... }
fn statfs(&self, _path: &Path) -> Result<statvfs> { ... }
fn flush(
&mut self,
_path: &Path,
_file_info: &mut FlushFileInfo,
) -> Result<()> { ... }
fn release(
&mut self,
_path: &Path,
_file_info: &mut ReleaseFileInfo,
) -> Result<()> { ... }
fn sync_data(&mut self, _path: &Path, _file_info: FileInfo) -> Result<()> { ... }
fn sync_all(&mut self, _path: &Path, _file_info: FileInfo) -> Result<()> { ... }
fn set_ext_metadata(
&mut self,
_path: &Path,
_name: String,
_value: &[u8],
_options: XAttrOption,
) -> Result<()> { ... }
fn get_ext_metadata(
&self,
_path: &Path,
_name: String,
_buf: &[u8],
_options: XAttrOption,
) -> Result<usize> { ... }
fn list_ext_metadata(&self, _path: &Path) -> Result<Vec<String>> { ... }
fn remove_ext_metadata(&mut self, _path: &Path, _name: String) -> Result<()> { ... }
fn open_dir(
&mut self,
_path: &Path,
_file_info: &mut OpenFileInfo,
) -> Result<()> { ... }
fn read_dir(
&mut self,
_path: &Path,
_offset: u64,
_file_info: FileInfo,
) -> Result<Vec<DirEntry>> { ... }
fn release_dir(
&mut self,
_path: &Path,
_file_info: &mut ReleaseFileInfo,
) -> Result<()> { ... }
fn sync_dir_data(
&mut self,
_path: &Path,
_file_info: FileInfo,
) -> Result<()> { ... }
fn sync_dir_all(&mut self, _path: &Path, _file_info: FileInfo) -> Result<()> { ... }
fn init(&mut self, _connection_info: &mut ConnectionInfo) -> Result<()> { ... }
fn destroy(&mut self) -> Result<()> { ... }
fn check_permissions(
&self,
_path: &Path,
_permissions: AccessFlags,
) -> Result<bool> { ... }
fn create(
&mut self,
_path: &Path,
_permissions: Mode,
_file_info: &mut OpenFileInfo,
) -> Result<()> { ... }
fn ftruncate(
&mut self,
_path: &Path,
_len: u64,
_file_info: FileInfo,
) -> Result<()> { ... }
fn fmetadata(&self, _path: &Path, _file_info: FileInfo) -> Result<FileStat> { ... }
fn lock(
&mut self,
_path: &Path,
_file_info: LockFileInfo,
_command: FcntlArg<'_>,
_file_lock: flock,
) -> Result<()> { ... }
fn utimens(
&mut self,
_path: &Path,
_atime: TimeSpec,
_mtime: TimeSpec,
) -> Result<()> { ... }
fn bmap(&self, _path: &Path, _blocksize: usize, _index: u64) -> Result<u64> { ... }
}