Class FileExtensions
Extension methods for IFile.
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public static class FileExtensions
Methods
ListUpdateHistoriesAsync(IFile, Range, CancellationToken)
Returns the update histories of the file.
Declaration
public static IAsyncEnumerable<FileUpdateHistory> ListUpdateHistoriesAsync(this IFile file, Range range, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IFile | file | The file to query. |
| Range | range | The range of results to return. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<FileUpdateHistory> | An async enumeration of FileUpdateHistory in descending order of SequenceNumber. |
UpdateAsync(IFile, FileUpdateHistory, CancellationToken)
Updates the file to its state at the specified update history sequence number.
Declaration
public static Task UpdateAsync(this IFile file, FileUpdateHistory fileUpdateHistory, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IFile | file | The file to query. |
| FileUpdateHistory | fileUpdateHistory | The update history entry to which the file should be updated. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
UpdateAsync(IFile, FileUpdateHistoryDescriptor, CancellationToken)
Updates the file to its state at the specified update history sequence number.
Declaration
public static Task UpdateAsync(this IFile file, FileUpdateHistoryDescriptor fileUpdateHistoryDescriptor, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IFile | file | The file to query. |
| FileUpdateHistoryDescriptor | fileUpdateHistoryDescriptor | The update history descriptor to which the file should be updated. |
| CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |