pub async fn replace_child<'a, S: HandleOwner>(
transaction: &mut Transaction<'a>,
src: Option<(&'a Directory<S>, &str)>,
dst: (&'a Directory<S>, &str),
) -> Result<ReplacedChild, Error>
Expand description
Moves src.0/src.1 to dst.0/dst.1.
If |dst.0| already has a child |dst.1|, it is removed from dst.0. For files, if this was their last reference, the file is moved to the graveyard. For directories, the removed directory will be deleted permanently (and must be empty).
If |src| is None, this is effectively the same as unlink(dst.0/dst.1).