pub struct FsEditor { /* private fields */ }Expand description
Applies update/switch/replay-style editor drives to a filesystem directory.
FsEditor is a thin “export” helper: it materializes files and directories,
but it does not implement a full Subversion working copy.
§Notes
- Paths from the server are treated as repository-relative (
/-separated) and are validated to avoid directory traversal. - Writes are refused beneath symlinks (or Windows reparse points) under
root, to avoid writing outside the export directory. - Text deltas are applied to the current on-disk file as the base. For a
fresh export, use a report with
start_empty = trueso servers typically send fulltext deltas. - This editor uses blocking
std::fsAPIs. If you need async filesystem I/O, seeTokioFsEditor.
Implementations§
Source§impl FsEditor
impl FsEditor
Sourcepub fn with_strip_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_strip_prefix(self, prefix: impl Into<String>) -> Self
Strips prefix from incoming editor paths if present.
This is useful when the server emits repository-relative paths, but the
caller wants root to correspond to a specific subtree (for example
exporting trunk/ into an empty directory).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FsEditor
impl RefUnwindSafe for FsEditor
impl Send for FsEditor
impl Sync for FsEditor
impl Unpin for FsEditor
impl UnsafeUnpin for FsEditor
impl UnwindSafe for FsEditor
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