Struct dotfiles_actions::link::action::LinkAction
source · pub struct LinkAction<'a, F: FileSystem + UnixFileSystem> { /* private fields */ }
Expand description
LinkAction creates a new symlink path
that points to target
.
It is equivalent to running ln -s <target> <path>
Implementations§
source§impl<'a, F: FileSystem + UnixFileSystem> LinkAction<'a, F>
impl<'a, F: FileSystem + UnixFileSystem> LinkAction<'a, F>
source§impl<'a, F: FileSystem + UnixFileSystem> LinkAction<'a, F>
impl<'a, F: FileSystem + UnixFileSystem> LinkAction<'a, F>
sourcepub fn create_parent_dirs(&self) -> bool
pub fn create_parent_dirs(&self) -> bool
Create all parent directories if they do not exist already
sourcepub fn ignore_missing_target(&self) -> bool
pub fn ignore_missing_target(&self) -> bool
Succeed even if target
doesn’t point to an existing file or dir.
sourcepub fn resolve_symlink_target(&self) -> bool
pub fn resolve_symlink_target(&self) -> bool
If the target is another symlink, resolve the ultimate concrete file or directory that it points to and make it the target
Trait Implementations§
source§impl<F: FileSystem + UnixFileSystem> Action<'_> for LinkAction<'_, F>
impl<F: FileSystem + UnixFileSystem> Action<'_> for LinkAction<'_, F>
source§impl<'a, F: FileSystem + UnixFileSystem> ConditionalAction<'a> for LinkAction<'a, F>
impl<'a, F: FileSystem + UnixFileSystem> ConditionalAction<'a> for LinkAction<'a, F>
source§fn skip_in_ci(&self) -> bool
fn skip_in_ci(&self) -> bool
Whether to skip this action in Continuous Integration environments. Read more
§fn check_conditions_and_execute(&self) -> Result<(), DotfilesError>
fn check_conditions_and_execute(&self) -> Result<(), DotfilesError>
Checks that the conditions allow for executing this action, and if so executes it according to
[execute(&self)]. Read more
source§impl<'a, F: FileSystem + UnixFileSystem> Debug for LinkAction<'a, F>
impl<'a, F: FileSystem + UnixFileSystem> Debug for LinkAction<'a, F>
Auto Trait Implementations§
impl<'a, F> Freeze for LinkAction<'a, F>
impl<'a, F> RefUnwindSafe for LinkAction<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for LinkAction<'a, F>where
F: Sync,
impl<'a, F> Sync for LinkAction<'a, F>where
F: Sync,
impl<'a, F> Unpin for LinkAction<'a, F>
impl<'a, F> UnwindSafe for LinkAction<'a, F>where
F: RefUnwindSafe,
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more