/// <summary>Removes the directory, its contents, and all subdirectories. /// Warning: Clients that have already opened the directory might still insert data into its contents after it is removed. /// </summary> public static Task RemoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbRetryable db, CancellationToken ct) { Contract.NotNull(directory, nameof(directory)); Contract.NotNull(db, nameof(db)); return(db.ReadWriteAsync((tr) => directory.RemoveAsync(tr), ct)); }
/// <summary>Removes the directory, its contents, and all subdirectories. /// Warning: Clients that have already opened the directory might still insert data into its contents after it is removed. /// </summary> public static Task RemoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbRetryable db, CancellationToken ct) { if (directory == null) { throw new ArgumentNullException(nameof(directory)); } if (db == null) { throw new ArgumentNullException(nameof(db)); } return(db.ReadWriteAsync((tr) => directory.RemoveAsync(tr), ct)); }
/// <summary>Removes the directory, its contents, and all subdirectories. /// Warning: Clients that have already opened the directory might still insert data into its contents after it is removed. /// </summary> public static Task RemoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbRetryable db, IEnumerable <string> path, CancellationToken cancellationToken) { if (directory == null) { throw new ArgumentNullException("directory"); } if (db == null) { throw new ArgumentNullException("db"); } return(db.ReadWriteAsync((tr) => directory.RemoveAsync(tr, path), cancellationToken)); }
/// <summary>Removes the directory, its contents, and all subdirectories. /// Warning: Clients that have already opened the directory might still insert data into its contents after it is removed. /// </summary> public static Task RemoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbRetryable db, [NotNull] string name, CancellationToken cancellationToken) { if (directory == null) { throw new ArgumentNullException("directory"); } if (db == null) { throw new ArgumentNullException("db"); } if (name == null) { throw new ArgumentNullException("name"); } return(db.ReadWriteAsync((tr) => directory.RemoveAsync(tr, new [] { name }), cancellationToken)); }
/// <summary>Removes the directory, its contents, and all subdirectories. /// Warning: Clients that have already opened the directory might still insert data into its contents after it is removed. /// </summary> public static Task RemoveAsync([NotNull] this IFdbDirectory directory, [NotNull] IFdbTransaction trans, [NotNull] string name) { if (directory == null) { throw new ArgumentNullException(nameof(directory)); } if (trans == null) { throw new ArgumentNullException(nameof(trans)); } if (name == null) { throw new ArgumentNullException(nameof(name)); } return(directory.RemoveAsync(trans, new[] { name })); }
public Task RemoveAsync([NotNull] string name, CancellationToken cancellationToken) { return(m_database.ReadWriteAsync((tr) => m_directory.RemoveAsync(tr, new string[] { name }), cancellationToken)); }