pub enum Operation {
Create {
path: PathBuf,
content: String,
},
Delete {
path: PathBuf,
},
Move {
src: PathBuf,
dst: PathBuf,
},
Copy {
src: PathBuf,
dst: PathBuf,
},
Write {
path: PathBuf,
content: String,
append: bool,
},
Mkdir {
path: PathBuf,
},
Symlink {
target: PathBuf,
link: PathBuf,
},
}Expand description
A single file operation.
Variants§
Create
Create a new file with content
Delete
Delete a file (soft delete if safety layer is enabled)
Move
Move/rename a file
Copy
Copy a file
Write
Write content to a file (overwrite or append)
Mkdir
Create a directory
Symlink
Create a symbolic link
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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