pub struct NoFollowDirectories<'a> { /* private fields */ }Expand description
Creates and verifies directories beneath a checkout root without ever traversing a symlink.
Verified directories are cached, so one instance should cover one batch of
writes in which nothing turns a verified directory back into a symlink. A
batch that also writes symlinks must write them after its other leaves and
recheck with refuse_symlinked_parent.
Implementations§
Source§impl<'a> NoFollowDirectories<'a>
impl<'a> NoFollowDirectories<'a>
pub fn new(root: &'a Path) -> NoFollowDirectories<'a>
Sourcepub fn ensure(&mut self, dir: &Path) -> Result<(), Error>
pub fn ensure(&mut self, dir: &Path) -> Result<(), Error>
Make dir and every directory between it and the root real
directories. Missing ones are created, a symlink in the way is replaced
by a directory, and any other non-directory is an error.
Sourcepub fn ensure_parent(&mut self, path: &Path) -> Result<(), Error>
pub fn ensure_parent(&mut self, path: &Path) -> Result<(), Error>
Self::ensure the directory that will hold the leaf path.
Auto Trait Implementations§
impl<'a> Freeze for NoFollowDirectories<'a>
impl<'a> RefUnwindSafe for NoFollowDirectories<'a>
impl<'a> Send for NoFollowDirectories<'a>
impl<'a> Sync for NoFollowDirectories<'a>
impl<'a> Unpin for NoFollowDirectories<'a>
impl<'a> UnsafeUnpin for NoFollowDirectories<'a>
impl<'a> UnwindSafe for NoFollowDirectories<'a>
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