[−][src]Struct badm::FileHandler
Moves, stores, and creates files and symlinks.
Methods
impl FileHandler
[src]
pub fn store_file(src: &Path, dst: &Path) -> Result<()>
[src]
Store a file in the dotfiles directory, create a symlink at the original source of the stowed file.
pub fn move_file(src: &Path, dst: &Path) -> Result<()>
[src]
Read file at path src and write to created/truncated file at path dst.
pub fn create_symlink(src: &Path, dst: &Path) -> Result<()>
[src]
Create a symlink at "dst" pointing to "src."
For Unix platforms, std::os::unix::fs::symlink
is used to create
symlinks. For Windows, std::os::windows::fs::symlink_file
is used.
Trait Implementations
impl Clone for FileHandler
[src]
fn clone(&self) -> FileHandler
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FileHandler
[src]
impl Debug for FileHandler
[src]
Auto Trait Implementations
impl Send for FileHandler
impl Sync for FileHandler
impl Unpin for FileHandler
impl UnwindSafe for FileHandler
impl RefUnwindSafe for FileHandler
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,