Interface IFileTransferService
Represents a service for transferring files from/to local disk from/to remote (cloud) storage
Namespace: DNVGL.One.Compute.Core.DataTransfer
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public interface IFileTransferService
Properties
View SourceShouldOverwrite
Gets or sets a callback to control when a destination file should be overwritten. Default is to always overwrite.
Declaration
Func<object, object, bool> ShouldOverwrite { get; set; }
Property Value
Type | Description |
---|---|
Func<System.Object, System.Object, System.Boolean> | The callback to determine whether a file should be overwritten. |
Methods
View SourceDownloadFilesAsync(IEnumerable<FileTransferSpecification>)
Downloads the specified files asynchronously.
Declaration
Task<IEnumerable<FileTransferResult>> DownloadFilesAsync(IEnumerable<FileTransferSpecification> fileTransferSpecifications)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<FileTransferSpecification> | fileTransferSpecifications | The file transfer specifications. |
Returns
Type | Description |
---|---|
Task<IEnumerable<FileTransferResult>> | Results from each download. |
UploadFilesAsync(IEnumerable<DataTransferSpecification>)
Uploads the specified files asynchronously.
Declaration
Task<IEnumerable<FileTransferResult>> UploadFilesAsync(IEnumerable<DataTransferSpecification> fileTransferSpecifications)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<DataTransferSpecification> | fileTransferSpecifications | The file transfer specifications defining the files to be uploaded. |
Returns
Type | Description |
---|---|
Task<IEnumerable<FileTransferResult>> | Results from each upload. |
UploadFilesAsync(IEnumerable<FileTransferSpecification>)
Uploads the specified files asynchronously.
Declaration
Task<IEnumerable<FileTransferResult>> UploadFilesAsync(IEnumerable<FileTransferSpecification> fileTransferSpecifications)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<FileTransferSpecification> | fileTransferSpecifications | The file transfer specifications. |
Returns
Type | Description |
---|---|
Task<IEnumerable<FileTransferResult>> | Results from each upload. |
Events
View SourceFileFailed
Occurs when the transfer of a file fails.
Declaration
event EventHandler<DataTransferEventArgs> FileFailed
Event Type
Type | Description |
---|---|
EventHandler<DataTransferEventArgs> |
FileSkipped
Occurs when the transfer of a file is skipped.
Declaration
event EventHandler<DataTransferEventArgs> FileSkipped
Event Type
Type | Description |
---|---|
EventHandler<DataTransferEventArgs> |
FileTransferred
Occurs when a file has been successfully transferred.
Declaration
event EventHandler<DataTransferEventArgs> FileTransferred
Event Type
Type | Description |
---|---|
EventHandler<DataTransferEventArgs> |