/// <summary>Moves the directory found at <paramref name="oldPath"/> 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 the old directory does not exist, a directory already exists at `new_path`, or the parent directory of `new_path` does not exist. /// </summary> public static Task <FdbDirectorySubspace> MoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbRetryable db, FdbDirectoryPath oldPath, FdbDirectoryPath newPath, CancellationToken ct) { Contract.NotNull(directory, nameof(directory)); Contract.NotNull(db, nameof(db)); return(db.ReadWriteAsync((tr) => directory.MoveAsync(tr, oldPath, newPath), ct)); }
/// <summary>Moves the directory found at <paramref name="oldPath"/> 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 the old directory does not exist, a directory already exists at `new_path`, or the parent directory of `new_path` does not exist. /// </summary> public static Task <FdbDirectorySubspace> MoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbRetryable db, [NotNull] IEnumerable <string> oldPath, [NotNull] IEnumerable <string> newPath, CancellationToken ct) { if (directory == null) { throw new ArgumentNullException(nameof(directory)); } if (db == null) { throw new ArgumentNullException(nameof(db)); } if (oldPath == null) { throw new ArgumentNullException(nameof(oldPath)); } if (newPath == null) { throw new ArgumentNullException(nameof(newPath)); } return(db.ReadWriteAsync((tr) => directory.MoveAsync(tr, oldPath, newPath), ct)); }
public Task <FdbDirectorySubspace> MoveAsync([NotNull] IEnumerable <string> oldPath, [NotNull] IEnumerable <string> newPath, CancellationToken cancellationToken) { return(m_database.ReadWriteAsync((tr) => m_directory.MoveAsync(tr, oldPath, newPath), cancellationToken)); }