public MoveToAsync ( IFdbTransaction trans, IEnumerable |
||
trans | IFdbTransaction | Transaction to use for the operation |
newAbsolutePath | IEnumerable |
Full path (from the root) where this directory will be moved |
return | Task |
/// <summary>Moves the current directory to <paramref name="newPath"/>. /// There is no effect on the physical prefix of the given directory, or on clients that already have the directory open. /// An error is raised if a directory already exists at `new_path`, or if the new path points to a child of the current directory. /// </summary> public static Task <FdbDirectorySubspace> MoveToAsync([NotNull] this FdbDirectorySubspace subspace, [NotNull] IFdbRetryable db, FdbDirectoryPath newPath, CancellationToken ct) { Contract.NotNull(subspace, nameof(subspace)); Contract.NotNull(db, nameof(db)); return(db.ReadWriteAsync((tr) => subspace.MoveToAsync(tr, newPath), ct)); }
/// <summary>Moves the current directory to <paramref name="newPath"/>. /// There is no effect on the physical prefix of the given directory, or on clients that already have the directory open. /// An error is raised if a directory already exists at `new_path`, or if the new path points to a child of the current directory. /// </summary> public static Task <FdbDirectorySubspace> MoveToAsync([NotNull] this FdbDirectorySubspace subspace, [NotNull] IFdbRetryable db, [NotNull] IEnumerable <string> newPath, CancellationToken ct) { if (subspace == null) { throw new ArgumentNullException(nameof(subspace)); } if (db == null) { throw new ArgumentNullException(nameof(db)); } if (newPath == null) { throw new ArgumentNullException(nameof(newPath)); } return(db.ReadWriteAsync((tr) => subspace.MoveToAsync(tr, newPath), ct)); }