Table of Contents

Interface IBackupService

Namespace
Ecng.Backup
Assembly
Ecng.Backup.dll

The interface describing online data storage service.

public interface IBackupService : IDisposable
Inherited Members
Extension Methods

Properties

CanFolders

Is folders feature available.

bool CanFolders { get; }

Property Value

bool

CanPartialDownload

Is partial download feature available.

bool CanPartialDownload { get; }

Property Value

bool

CanPublish

Is publishing feature available.

bool CanPublish { get; }

Property Value

bool

Methods

CreateFolder(BackupEntry, CancellationToken)

Is partial upload feature available.

Task CreateFolder(BackupEntry entry, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

BackupEntry

cancellationToken CancellationToken

CancellationToken

Returns

Task

Task

DeleteAsync(BackupEntry, CancellationToken)

Delete file from the service.

Task DeleteAsync(BackupEntry entry, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

Element.

cancellationToken CancellationToken

CancellationToken

Returns

Task

Task

DownloadAsync(BackupEntry, Stream, long?, long?, Action<int>, CancellationToken)

Save file.

Task DownloadAsync(BackupEntry entry, Stream stream, long? offset, long? length, Action<int> progress, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

Element.

stream Stream
offset long?
length long?
progress Action<int>

Progress notification.

cancellationToken CancellationToken

CancellationToken

Returns

Task

Task

FillInfoAsync(BackupEntry, CancellationToken)

Fill file info.

Task FillInfoAsync(BackupEntry entry, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

Element.

cancellationToken CancellationToken

CancellationToken

Returns

Task

Task

FindAsync(BackupEntry, string, CancellationToken)

Find files by the specified criteria.

IAsyncEnumerable<BackupEntry> FindAsync(BackupEntry parent, string criteria, CancellationToken cancellationToken = default)

Parameters

parent BackupEntry

Parent element. Can be null.

criteria string

Criteria.

cancellationToken CancellationToken

CancellationToken

Returns

IAsyncEnumerable<BackupEntry>

File list.

PublishAsync(BackupEntry, CancellationToken)

Get public url for the specified element.

Task<string> PublishAsync(BackupEntry entry, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

Element.

cancellationToken CancellationToken

CancellationToken

Returns

Task<string>

Public url.

UnPublishAsync(BackupEntry, CancellationToken)

Remove public url for the specified element.

Task UnPublishAsync(BackupEntry entry, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

Element.

cancellationToken CancellationToken

CancellationToken

Returns

Task

Task

UploadAsync(BackupEntry, Stream, Action<int>, CancellationToken)

Upload file.

Task UploadAsync(BackupEntry entry, Stream stream, Action<int> progress, CancellationToken cancellationToken = default)

Parameters

entry BackupEntry

Element.

stream Stream

The stream of the open file into which data from the service will be downloaded.

progress Action<int>

Progress notification.

cancellationToken CancellationToken

CancellationToken

Returns

Task

Task