Show / Hide Table of Contents

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 Source

ShouldOverwrite

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.

View Source

ShouldTransfer

Gets or sets a callback to control when a file should be transferred. The default is to always transfer.

Declaration
Func<object, object, bool> ShouldTransfer { get; set; }
Property Value
Type Description
Func<System.Object, System.Object, System.Boolean>

The callback to determine whether a file should be transferred.

Remarks

This method could be used if the file selection is more complex than could be done by setting the selection and inclusion filters. The transfer logic is the following: selected and !excluded and ShouldTransfer.

Methods

View Source

DownloadFilesAsync(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.

View Source

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.

View Source

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 Source

FileFailed

Occurs when the transfer of a file fails.

Declaration
event EventHandler<DataTransferEventArgs> FileFailed
Event Type
Type Description
EventHandler<DataTransferEventArgs>
View Source

FileSkipped

Occurs when the transfer of a file is skipped.

Declaration
event EventHandler<DataTransferEventArgs> FileSkipped
Event Type
Type Description
EventHandler<DataTransferEventArgs>
View Source

FileTransferred

Occurs when a file has been successfully transferred.

Declaration
event EventHandler<DataTransferEventArgs> FileTransferred
Event Type
Type Description
EventHandler<DataTransferEventArgs>
  • View Source
Back to top Copyright © DNV GL AS. All rights reserved.