pub struct FsClient<F: FileSystem> { /* private fields */ }Expand description
Cloneable owner of one synchronous backend connection.
Clones share a mutex and serialize backend calls; use separate connections
for parallel RPCs. Explicitly close handles to observe cleanup failures.
Handle Drop queues cleanup, drained before later operations or by
drain_cleanup. Dropping the final backend owner performs synchronous
teardown and may wait for pending closes and backend request timeouts.
Implementations§
Source§impl<F: FileSystem> FsClient<F>
impl<F: FileSystem> FsClient<F>
pub fn new(filesystem: F) -> Self
Sourcepub fn with_limits(self, limits: ResourceLimits) -> Self
pub fn with_limits(self, limits: ResourceLimits) -> Self
Configure this client view and its future clones. Existing clones keep their policy; all views still share the same connection and ownership.
pub fn limits(&self) -> ResourceLimits
pub fn into_inner(self) -> Result<F, Self>
Sourcepub fn drain_cleanup(&self) -> VfResult<()>
pub fn drain_cleanup(&self) -> VfResult<()>
Drain queued Drop cleanup and report the first failure. Failed targets remain owned for later cleanup. No new file operation is replayed.
Source§impl<F: FileSystem> FsClient<F>
impl<F: FileSystem> FsClient<F>
pub fn open_options(&self) -> OpenOptions<'_, F>
Source§impl<F: Backend> FsClient<F>
impl<F: Backend> FsClient<F>
pub fn set_metadata(&self, path: impl AsRef<Path>) -> SetMetadata<'_, F>
Trait Implementations§
Source§impl<F: FileSystem> Clone for FsClient<F>
impl<F: FileSystem> Clone for FsClient<F>
Source§impl<F: FileSystem> Debug for FsClient<F>
impl<F: FileSystem> Debug for FsClient<F>
Source§impl<F: Backend + 'static> Vfsi for FsClient<F>
impl<F: Backend + 'static> Vfsi for FsClient<F>
Source§fn vrename<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
pairs: &[(P, Q)],
options: RenameOptions,
) -> Result<()>
fn vrename<P: AsRef<Path>, Q: AsRef<Path>>( &self, pairs: &[(P, Q)], options: RenameOptions, ) -> Result<()>
Rename independent pairs in input order using the requested atomic
destination behavior. Each pair is atomic where the backend supports
the option; the vector is not a transaction, so failures may leave a
completed prefix. Source and destination are resolved in this filesystem
namespace. Unsupported guarantees return
Unsupported rather than
being emulated with check-then-rename. Read moreSource§fn vlistdirs<P: AsRef<Path>>(
&self,
paths: &[P],
options: ListDirOptions,
callback: impl FnMut(usize, DirectoryListing) -> Result<ControlFlow<()>>,
) -> Result<Vec<TraversalCompletion>>
fn vlistdirs<P: AsRef<Path>>( &self, paths: &[P], options: ListDirOptions, callback: impl FnMut(usize, DirectoryListing) -> Result<ControlFlow<()>>, ) -> Result<Vec<TraversalCompletion>>
Visit shallow directories (default) or recursive trees using bounded pages.
Entry/path-byte limits are shared across roots; recursive visits also
charge retained directory path bytes. Root index accompanies every owned directory page, including empty directories.
Callbacks run outside backend locks and may reenter. Entries for one directory may span several pages. Break stops the
whole vector. The returned prefix covers every root whose pages reached
the callback; unfinished roots are Stopped. Pages may interleave between roots. Read more
Source§fn vstream<P: AsRef<Path>>(
&self,
paths: &[P],
options: StreamOptions,
callback: impl FnMut(usize, u64, &[u8]) -> Result<bool>,
) -> Result<Vec<StreamCompletion>>
fn vstream<P: AsRef<Path>>( &self, paths: &[P], options: StreamOptions, callback: impl FnMut(usize, u64, &[u8]) -> Result<bool>, ) -> Result<Vec<StreamCompletion>>
Stream files through bounded chunks without collecting whole contents.
The callback receives the input index, byte offset, and borrowed chunk.
False stops the whole vector; results contain its completed/stopped prefix.
Backends may process streams sequentially; this is not a parallelism promise. Read more
Source§fn capabilities(&self) -> Result<Capabilities>
fn capabilities(&self) -> Result<Capabilities>
Capabilities supported by this client. Routed clients report capabilities
common to their routes; support does not imply authorization for a path.
Source§fn vsymlink<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
pairs: &[(P, Q)],
) -> Result<()>
fn vsymlink<P: AsRef<Path>, Q: AsRef<Path>>( &self, pairs: &[(P, Q)], ) -> Result<()>
Create symbolic links from
(target text, link path) pairs.
Targets are stored verbatim, including relative or dangling targets.
Parents must exist. Errors may follow partial creation; no rollback.Source§fn vreadlink<P: AsRef<Path>>(&self, paths: &[P]) -> Result<Vec<PathBuf>>
fn vreadlink<P: AsRef<Path>>(&self, paths: &[P]) -> Result<Vec<PathBuf>>
Read symbolic link targets in input order without following final links.
Returns their original path bytes, including non-UTF-8 names on Unix.
An error identifies the input when known and discards collected results.
Source§fn vhardlink<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
pairs: &[(P, Q)],
) -> Result<()>
fn vhardlink<P: AsRef<Path>, Q: AsRef<Path>>( &self, pairs: &[(P, Q)], ) -> Result<()>
Create hard links from
(existing source, new link path) pairs.
Sources are not followed when the final component is a symlink.
Cross-filesystem links can fail. Errors may follow partial creation.Source§fn vstatfs<P: MetadataOperand<Self::File>>(
&self,
targets: &[P],
) -> Result<Vec<FilesystemStats>>
fn vstatfs<P: MetadataOperand<Self::File>>( &self, targets: &[P], ) -> Result<Vec<FilesystemStats>>
Query filesystems for paths (following symlinks) and retained open handles.
Results preserve input order. Unsupported fields are
None.Source§fn vsetattrs<P: MetadataOperand<Self::File>>(
&self,
updates: &[(P, MetadataUpdate)],
follow_symlinks: bool,
) -> Result<()>
fn vsetattrs<P: MetadataOperand<Self::File>>( &self, updates: &[(P, MetadataUpdate)], follow_symlinks: bool, ) -> Result<()>
Update selected attributes for paths or open handles using native batching.
Every handle is validated before dispatch, including ownership and closure.
Unspecified fields are unchanged.
follow_symlinks controls the final
component of path targets; it does not change open-handle identity.
Ancestor symlinks retain ordinary backend resolution.
Failure can follow partial mutations, including within one request;
an error index identifies an input, not a committed-prefix count.
Empty vectors succeed without I/O. Do not replay ambiguous failures. Read moreSource§fn vgetattrs<P: AsRef<Path>>(
&self,
paths: &[P],
options: AttrsOptions,
) -> Result<Vec<Attrs>>
fn vgetattrs<P: AsRef<Path>>( &self, paths: &[P], options: AttrsOptions, ) -> Result<Vec<Attrs>>
Query metadata in input order with selected fields and final-symlink behavior.
Backend execution must preserve vector batching. Ancestor symlinks use
ordinary namespace resolution; this is not a snapshot or confinement API. Read more
Source§fn limits(&self) -> ResourceLimits
fn limits(&self) -> ResourceLimits
Collection/batch defaults, not a process memory cap or file-reader cap. Read more
Source§fn vopen(&self, requests: &[OpenOp]) -> Result<Vec<Self::File>>
fn vopen(&self, requests: &[OpenOp]) -> Result<Vec<Self::File>>
Strict ordered OPEN results. Failure releases returned handles but cannot
undo files created/truncated earlier;
index() is not a progress count. Read moreSource§fn vread<'a>(
&self,
ops: impl IntoIterator<Item = ReadOp<'a, Self::File>>,
options: ReadOptions,
) -> Result<Vec<ReadResult>>
fn vread<'a>( &self, ops: impl IntoIterator<Item = ReadOp<'a, Self::File>>, options: ReadOptions, ) -> Result<Vec<ReadResult>>
Consume a read batch with an explicit aggregate logical-byte budget.
Large files should usually be streamed instead of increasing the budget.
Explicit options override client defaults. Read more
Source§fn vwrite<'a>(
&self,
requests: &[WriteOp<'a, Self::File>],
options: WriteOptions,
) -> Result<Vec<WriteResult>>
fn vwrite<'a>( &self, requests: &[WriteOp<'a, Self::File>], options: WriteOptions, ) -> Result<Vec<WriteResult>>
Write positional ranges with explicit short-write policy.
With default options, report accepted byte counts without completing short writes.
With
write_all(true), finish short writes after whole-batch local preflight.
Backend failures can still follow mutations; aliasing paths are the
caller’s responsibility and do not imply transactional ordering. Read moreSource§fn vclose(&self, files: &mut [Self::File]) -> Result<()>
fn vclose(&self, files: &mut [Self::File]) -> Result<()>
Retain handles for failed cleanup; completed groups can already be
closed. A lost reply leaves remote state ambiguous, not safely open. Read more
Source§fn vmkdir<P: AsRef<Path>>(&self, paths: &[(P, u32)]) -> Result<()>
fn vmkdir<P: AsRef<Path>>(&self, paths: &[(P, u32)]) -> Result<()>
Strict vector directory creation. Parents must already exist; errors
can follow completed mutations, and do not imply rollback. Read more
Auto Trait Implementations§
impl<F> Freeze for FsClient<F>
impl<F> RefUnwindSafe for FsClient<F>where
Arc<SharedBackend<F>>: RefUnwindSafe,
impl<F> Send for FsClient<F>
impl<F> Sync for FsClient<F>
impl<F> Unpin for FsClient<F>
impl<F> UnsafeUnpin for FsClient<F>where
Arc<SharedBackend<F>>: UnsafeUnpin,
impl<F> UnwindSafe for FsClient<F>where
Arc<SharedBackend<F>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C> VfsiExt for C
impl<C> VfsiExt for C
Source§fn statfs<P>(&self, target: P) -> Result<FilesystemStats, VfError>where
P: MetadataOperand<Self::File>,
fn statfs<P>(&self, target: P) -> Result<FilesystemStats, VfError>where
P: MetadataOperand<Self::File>,
Query one target through the vector filesystem-statistics engine.
Source§fn open(&self, path: impl AsRef<Path>) -> Result<Self::File, VfError>
fn open(&self, path: impl AsRef<Path>) -> Result<Self::File, VfError>
Single-target convenience. For multiple files, prefer
Vfsi::vopen to expose batching opportunities. Read moreSource§fn create(&self, path: impl AsRef<Path>) -> Result<Self::File, VfError>
fn create(&self, path: impl AsRef<Path>) -> Result<Self::File, VfError>
Single-target convenience. For multiple creations, prefer
Vfsi::vopen with CREATE/TRUNCATE flags. Read moreSource§fn open_with(&self, request: OpenOp) -> Result<Self::File, VfError>
fn open_with(&self, request: OpenOp) -> Result<Self::File, VfError>
Single-target convenience. For multiple requests, prefer
Vfsi::vopen with per-file flags and modes. Read moreSource§fn close_files(&self, files: Vec<Self::File>) -> Result<(), VfError>
fn close_files(&self, files: Vec<Self::File>) -> Result<(), VfError>
Consume all handles. Errors cannot return cleanup ownership; Drop is
best-effort. Prefer
vclose when close errors require reconciliation. Read moreSource§fn read(&self, path: impl AsRef<Path>) -> Result<Vec<u8>, VfError>
fn read(&self, path: impl AsRef<Path>) -> Result<Vec<u8>, VfError>
Read one complete file within the client’s aggregate read budget. Read more
Source§fn read_with_options(
&self,
path: impl AsRef<Path>,
options: ReadOptions,
) -> Result<Vec<u8>, VfError>
fn read_with_options( &self, path: impl AsRef<Path>, options: ReadOptions, ) -> Result<Vec<u8>, VfError>
Read one complete file with an explicit read policy.
Source§fn read_files<P>(&self, paths: &[P]) -> Result<Vec<Vec<u8>>, VfError>
fn read_files<P>(&self, paths: &[P]) -> Result<Vec<Vec<u8>>, VfError>
Read complete files in input order using vectorized whole-file reads. Read more
Source§fn read_files_with_options<P>(
&self,
paths: &[P],
options: ReadOptions,
) -> Result<Vec<Vec<u8>>, VfError>
fn read_files_with_options<P>( &self, paths: &[P], options: ReadOptions, ) -> Result<Vec<Vec<u8>>, VfError>
Whole-file convenience reads with an explicit aggregate payload budget. Read more
Source§fn read_to_string(&self, path: impl AsRef<Path>) -> Result<String, VfError>
fn read_to_string(&self, path: impl AsRef<Path>) -> Result<String, VfError>
Single-target convenience. For multiple files, prefer
Vfsi::vread with whole-file operations and decode each result as UTF-8. Read moreSource§fn read_to_string_with_options(
&self,
path: impl AsRef<Path>,
options: ReadOptions,
) -> Result<String, VfError>
fn read_to_string_with_options( &self, path: impl AsRef<Path>, options: ReadOptions, ) -> Result<String, VfError>
Single-target convenience. For multiple files, prefer
Vfsi::vread with an aggregate byte budget, then decode UTF-8. Read moreSource§fn read_stream(
&self,
path: impl AsRef<Path>,
callback: impl FnMut(u64, &[u8]) -> Result<bool, VfError>,
) -> Result<StreamCompletion, VfError>
fn read_stream( &self, path: impl AsRef<Path>, callback: impl FnMut(u64, &[u8]) -> Result<bool, VfError>, ) -> Result<StreamCompletion, VfError>
Single-target convenience. For multiple files, prefer
Vfsi::vstream. Backends may process streams sequentially. Read moreSource§fn read_stream_with_options(
&self,
path: impl AsRef<Path>,
options: StreamOptions,
callback: impl FnMut(u64, &[u8]) -> Result<bool, VfError>,
) -> Result<StreamCompletion, VfError>
fn read_stream_with_options( &self, path: impl AsRef<Path>, options: StreamOptions, callback: impl FnMut(u64, &[u8]) -> Result<bool, VfError>, ) -> Result<StreamCompletion, VfError>
Single-target convenience. For multiple files, prefer
Vfsi::vstream. Backends may process streams sequentially. Read moreSource§fn write(&self, path: impl AsRef<Path>, data: &[u8]) -> Result<(), VfError>
fn write(&self, path: impl AsRef<Path>, data: &[u8]) -> Result<(), VfError>
Single-target convenience. For multiple complete files, prefer
VfsiExt::write_files; for opened handles, prefer Vfsi::vwrite. Read moreSource§fn write_files<P, B>(&self, entries: &[(P, B)]) -> Result<(), VfError>
fn write_files<P, B>(&self, entries: &[(P, B)]) -> Result<(), VfError>
Replace files in vector phases. Success completes payloads; errors may
follow create/truncate/write effects and never authorize blind replay. Read more
Source§fn attrs(&self, path: impl AsRef<Path>) -> Result<Attrs, VfError>
fn attrs(&self, path: impl AsRef<Path>) -> Result<Attrs, VfError>
Single-target convenience. For multiple paths, prefer
Vfsi::vgetattrs. Read moreSource§fn attrs_with_options(
&self,
path: impl AsRef<Path>,
options: AttrsOptions,
) -> Result<Attrs, VfError>
fn attrs_with_options( &self, path: impl AsRef<Path>, options: AttrsOptions, ) -> Result<Attrs, VfError>
Single-target convenience. For multiple paths, prefer
Vfsi::vgetattrs with selected fields and follow_symlinks(false). Read moreSource§fn symlink_attrs(&self, path: impl AsRef<Path>) -> Result<Attrs, VfError>
fn symlink_attrs(&self, path: impl AsRef<Path>) -> Result<Attrs, VfError>
Single-target convenience. For multiple paths, prefer
Vfsi::vgetattrs with follow_symlinks(false). Read moreSource§fn read_dir(&self, path: impl AsRef<Path>) -> Result<Vec<DirEntry>, VfError>
fn read_dir(&self, path: impl AsRef<Path>) -> Result<Vec<DirEntry>, VfError>
Single-target convenience. For multiple directories, prefer
VfsiExt::read_dirs_with_options or VfsiExt::read_dirs. Read moreSource§fn read_dir_with_options(
&self,
path: impl AsRef<Path>,
options: ListDirOptions,
) -> Result<Vec<DirEntry>, VfError>
fn read_dir_with_options( &self, path: impl AsRef<Path>, options: ListDirOptions, ) -> Result<Vec<DirEntry>, VfError>
Single-target convenience. For multiple directories, prefer
VfsiExt::read_dirs_with_options with one aggregate budget. Read moreSource§fn read_dirs<P>(&self, paths: &[P]) -> Result<Vec<DirectoryListing>, VfError>
fn read_dirs<P>(&self, paths: &[P]) -> Result<Vec<DirectoryListing>, VfError>
Collect directory listings under one aggregate entry/path-byte policy. Read more
Source§fn read_dirs_with_options<P>(
&self,
paths: &[P],
options: ListDirOptions,
) -> Result<Vec<Vec<DirectoryListing>>, VfError>
fn read_dirs_with_options<P>( &self, paths: &[P], options: ListDirOptions, ) -> Result<Vec<Vec<DirectoryListing>>, VfError>
Collect shallow directories or recursive trees, grouped by input root. Read more
Source§fn walk(&self, root: impl AsRef<Path>) -> Result<Vec<DirectoryListing>, VfError>
fn walk(&self, root: impl AsRef<Path>) -> Result<Vec<DirectoryListing>, VfError>
Single-target convenience. For multiple roots, prefer
VfsiExt::read_dirs_with_options. Read moreSource§fn walk_with_options(
&self,
path: impl AsRef<Path>,
options: ListDirOptions,
) -> Result<Vec<DirectoryListing>, VfError>
fn walk_with_options( &self, path: impl AsRef<Path>, options: ListDirOptions, ) -> Result<Vec<DirectoryListing>, VfError>
Single-target convenience. For multiple roots, prefer
VfsiExt::read_dirs_with_options with one aggregate budget. Read moreSource§fn visit_dir(
&self,
path: impl AsRef<Path>,
callback: impl FnMut(&DirEntry) -> Result<ControlFlow<()>, VfError>,
) -> Result<TraversalCompletion, VfError>
fn visit_dir( &self, path: impl AsRef<Path>, callback: impl FnMut(&DirEntry) -> Result<ControlFlow<()>, VfError>, ) -> Result<TraversalCompletion, VfError>
Single-target convenience. For multiple directories, prefer
Vfsi::vlistdirs. Read moreSource§fn visit_walk(
&self,
root: impl AsRef<Path>,
callback: impl FnMut(&DirEntry) -> Result<ControlFlow<()>, VfError>,
) -> Result<TraversalCompletion, VfError>
fn visit_walk( &self, root: impl AsRef<Path>, callback: impl FnMut(&DirEntry) -> Result<ControlFlow<()>, VfError>, ) -> Result<TraversalCompletion, VfError>
Single-target convenience. For multiple roots, prefer
Vfsi::vlistdirs. Read moreSource§fn visit_dir_with_options(
&self,
path: impl AsRef<Path>,
options: ListDirOptions,
callback: impl FnMut(&DirEntry) -> Result<ControlFlow<()>, VfError>,
) -> Result<TraversalCompletion, VfError>
fn visit_dir_with_options( &self, path: impl AsRef<Path>, options: ListDirOptions, callback: impl FnMut(&DirEntry) -> Result<ControlFlow<()>, VfError>, ) -> Result<TraversalCompletion, VfError>
Single-target convenience. For multiple directories, prefer
Vfsi::vlistdirs. Read moreSource§fn visit_entries_with_options<P>(
&self,
paths: &[P],
options: ListDirOptions,
callback: impl FnMut(usize, &DirEntry) -> Result<ControlFlow<()>, VfError>,
) -> Result<Vec<TraversalCompletion>, VfError>
fn visit_entries_with_options<P>( &self, paths: &[P], options: ListDirOptions, callback: impl FnMut(usize, &DirEntry) -> Result<ControlFlow<()>, VfError>, ) -> Result<Vec<TraversalCompletion>, VfError>
Visit individual entries using the directory-page primitive.
Empty directories produce pages but no entry callbacks.
Source§fn walk_events_with_options(
&self,
root: impl AsRef<Path>,
fields: AttrMask,
options: WalkOptions,
sort_by_name: bool,
callback: impl FnMut(&WalkEvent) -> Result<WalkControl, VfError>,
) -> Result<TraversalCompletion, VfError>
fn walk_events_with_options( &self, root: impl AsRef<Path>, fields: AttrMask, options: WalkOptions, sort_by_name: bool, callback: impl FnMut(&WalkEvent) -> Result<WalkControl, VfError>, ) -> Result<TraversalCompletion, VfError>
Single-target convenience. For multiple roots without enter/leave events or subtree pruning, prefer
Vfsi::vlistdirs. Keep this helper when those event semantics are required. Read moreSource§fn visit_dirs_ordered(
&self,
root: impl AsRef<Path>,
fields: AttrMask,
options: WalkOptions,
order: impl FnMut(&mut [DirEntry]),
descend: impl FnMut(&DirEntry) -> bool,
visitor: impl FnMut(DirectoryListing, usize) -> Result<WalkControl, VfError>,
) -> Result<TraversalCompletion, VfError>
fn visit_dirs_ordered( &self, root: impl AsRef<Path>, fields: AttrMask, options: WalkOptions, order: impl FnMut(&mut [DirEntry]), descend: impl FnMut(&DirEntry) -> bool, visitor: impl FnMut(DirectoryListing, usize) -> Result<WalkControl, VfError>, ) -> Result<TraversalCompletion, VfError>
Visit complete shallow listings in depth-first order with application policy. Read more
Source§fn create_dir(&self, path: impl AsRef<Path>) -> Result<(), VfError>
fn create_dir(&self, path: impl AsRef<Path>) -> Result<(), VfError>
Single-target convenience. For multiple independent directories, prefer
Vfsi::vmkdir. Read moreSource§fn truncate<T>(&self, target: T, len: u64) -> Result<(), VfError>where
T: MetadataOperand<Self::File>,
fn truncate<T>(&self, target: T, len: u64) -> Result<(), VfError>where
T: MetadataOperand<Self::File>,
Truncate or extend one path or opened object using
Vfsi::vsetattrs.Source§fn chmod<T>(&self, target: T, permissions: Permissions) -> Result<(), VfError>where
T: MetadataOperand<Self::File>,
fn chmod<T>(&self, target: T, permissions: Permissions) -> Result<(), VfError>where
T: MetadataOperand<Self::File>,
Change permissions on one path or opened object using
Vfsi::vsetattrs.Source§fn chown<T>(
&self,
target: T,
uid: Option<u32>,
gid: Option<u32>,
) -> Result<(), VfError>where
T: MetadataOperand<Self::File>,
fn chown<T>(
&self,
target: T,
uid: Option<u32>,
gid: Option<u32>,
) -> Result<(), VfError>where
T: MetadataOperand<Self::File>,
Change ownership of one path or opened object through
Vfsi::vsetattrs.
None leaves the corresponding owner/group unchanged. Use the vector
with follow_symlinks = false to change a symlink itself.Source§fn create_dir_with_mode(
&self,
path: impl AsRef<Path>,
mode: u32,
) -> Result<(), VfError>
fn create_dir_with_mode( &self, path: impl AsRef<Path>, mode: u32, ) -> Result<(), VfError>
Create one directory with explicit Unix permission bits.
Source§fn symlink(
&self,
target: impl AsRef<Path>,
link: impl AsRef<Path>,
) -> Result<(), VfError>
fn symlink( &self, target: impl AsRef<Path>, link: impl AsRef<Path>, ) -> Result<(), VfError>
Create one symbolic link; submit multiple pairs with
Vfsi::vsymlink.Source§fn read_link(&self, path: impl AsRef<Path>) -> Result<PathBuf, VfError>
fn read_link(&self, path: impl AsRef<Path>) -> Result<PathBuf, VfError>
Read one symlink target; submit multiple paths with
Vfsi::vreadlink.Source§fn hard_link(
&self,
source: impl AsRef<Path>,
link: impl AsRef<Path>,
) -> Result<(), VfError>
fn hard_link( &self, source: impl AsRef<Path>, link: impl AsRef<Path>, ) -> Result<(), VfError>
Create one hard link; submit multiple pairs with
Vfsi::vhardlink.Source§fn create_dir_all(&self, path: impl AsRef<Path>) -> Result<(), VfError>
fn create_dir_all(&self, path: impl AsRef<Path>) -> Result<(), VfError>
Single-target convenience. For multiple directory creations, prefer
Vfsi::vmkdir; plan missing parents before their children. Read moreSource§fn rename(
&self,
source: impl AsRef<Path>,
destination: impl AsRef<Path>,
) -> Result<(), VfError>
fn rename( &self, source: impl AsRef<Path>, destination: impl AsRef<Path>, ) -> Result<(), VfError>
Single-target convenience. For multiple source/destination pairs, prefer
Vfsi::vrename. Read moreSource§fn copy(
&self,
source: impl AsRef<Path>,
destination: impl AsRef<Path>,
) -> Result<(), VfError>
fn copy( &self, source: impl AsRef<Path>, destination: impl AsRef<Path>, ) -> Result<(), VfError>
Single-target convenience. For multiple file pairs, prefer
Vfsi::vcopy. Read moreSource§fn copy_with_options(
&self,
source: impl AsRef<Path>,
destination: impl AsRef<Path>,
options: CopyOption,
) -> Result<(), VfError>
fn copy_with_options( &self, source: impl AsRef<Path>, destination: impl AsRef<Path>, options: CopyOption, ) -> Result<(), VfError>
Single-target copy with explicit operation semantics; prefer
Vfsi::vcopy
when submitting multiple pairs.Source§fn remove_file(&self, path: impl AsRef<Path>) -> Result<(), VfError>
fn remove_file(&self, path: impl AsRef<Path>) -> Result<(), VfError>
Single-target convenience. For multiple paths, prefer
Vfsi::vremove. That vector API accepts both files and directories. Read moreSource§fn remove_dir(&self, path: impl AsRef<Path>) -> Result<(), VfError>
fn remove_dir(&self, path: impl AsRef<Path>) -> Result<(), VfError>
Single-target convenience. For multiple paths, prefer
Vfsi::vremove. That vector API does not enforce directory-only inputs. Read moreSource§fn remove_dir_all(&self, path: impl AsRef<Path>) -> Result<(), VfError>
fn remove_dir_all(&self, path: impl AsRef<Path>) -> Result<(), VfError>
Single-target convenience. For multiple trees, prefer
Vfsi::vremove with RemoveMode::Tree. Read moreSource§fn remove_dir_all_with_options(
&self,
path: impl AsRef<Path>,
options: RemoveOptions,
) -> Result<(), VfError>
fn remove_dir_all_with_options( &self, path: impl AsRef<Path>, options: RemoveOptions, ) -> Result<(), VfError>
Recursively remove one directory using explicit batching and failure
policy. The directory is validated before mutation; symlink roots are
not followed. Prefer
Vfsi::vremove when removing several trees.Source§fn remove_dir_contents(&self, path: impl AsRef<Path>) -> Result<(), VfError>
fn remove_dir_contents(&self, path: impl AsRef<Path>) -> Result<(), VfError>
Single-target convenience. For multiple directory roots, prefer
Vfsi::vremove. Read moreSource§fn remove_dir_contents_with_options(
&self,
path: impl AsRef<Path>,
options: RemoveOptions,
) -> Result<(), VfError>
fn remove_dir_contents_with_options( &self, path: impl AsRef<Path>, options: RemoveOptions, ) -> Result<(), VfError>
Recursively empty one directory while retaining its root, using
explicit batching and failure policy. The root is validated without
following a symlink. Prefer
Vfsi::vremove for several roots.