[][src]Struct badm::FileHandler

pub struct 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.

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]

impl Copy for FileHandler[src]

impl Debug for FileHandler[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]