pub async fn replace_child_with_object<'a, S: HandleOwner>(
transaction: &mut Transaction<'a>,
src: Option<(u64, ObjectDescriptor)>,
dst: (&'a Directory<S>, &str),
sub_dirs_delta: i64,
timestamp: Timestamp,
) -> Result<ReplacedChild, Error>
Expand description
Replaces dst.0/dst.1 with the given object, or unlinks if src
is None.
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).
sub_dirs_delta
can be used if src
is a directory and happened to already be a child of
dst
.