Method CleanAsync
CleanAsync(TimeSpan, CancellationToken)
Cleans up the repository by removing files whose delete markers are older than deleteDelay.
Declaration
public Task CleanAsync(TimeSpan deleteDelay, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | deleteDelay | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Implements
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Another clean operation is already in progress. |
| DirectoryNotFoundException | The repository has not been initialized. Call EnsureCreated() first. |
CleanAsync(TimeSpan, Func<FileId, IndeterminateResolution>?, CancellationToken)
Cleans up the repository by removing files whose delete markers are older than deleteDelay and resolving indeterminate files using
the provided synchronous callback.
Declaration
public Task CleanAsync(TimeSpan deleteDelay, Func<FileId, IndeterminateResolution>? resolveIndeterminateCallback, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | deleteDelay | |
| Func<FileId, IndeterminateResolution> | resolveIndeterminateCallback | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Implements
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Another clean operation is already in progress. |
| DirectoryNotFoundException | The repository has not been initialized. Call EnsureCreated() first. |
CleanAsync(TimeSpan, Func<FileId, Task<IndeterminateResolution>>?, CancellationToken)
Cleans up the repository by removing files whose delete markers are older than deleteDelay and resolving indeterminate files using
the provided asynchronous callback.
Declaration
public Task CleanAsync(TimeSpan deleteDelay, Func<FileId, Task<IndeterminateResolution>>? resolveIndeterminateCallback, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | deleteDelay | |
| Func<FileId, Task<IndeterminateResolution>> | resolveIndeterminateCallback | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Implements
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Another clean operation is already in progress. |
| DirectoryNotFoundException | The repository has not been initialized. Call EnsureCreated() first. |