YetaWF.DataProvider.File Package Documentation


YetaWF.DataProvider.FileDataProvider<KEYTYPE,OBJTYPE>.ExportChunkAsync Method

Exports data from the data provider.

Class: YetaWF.DataProvider.FileDataProvider<KEYTYPE,OBJTYPE>
Namespace: YetaWF.DataProvider
Assembly: YetaWF.DataProvider.File


public Task<YetaWF.Core.DataProvider.DataProviderExportChunk> ExportChunkAsync(
    int chunk,
    YetaWF.Core.Serializers.SerializableList<YetaWF.Core.Packages.SerializableFile> fileList );



The zero-based chunk number as data is exported. The first call when exporting begins specifies 0 as chunk number.


A collection of files. The data provider can add files to be exported to this collection when ExportChunkAsync is called.

Return Value

Returns a YetaWF.Core.DataProvider.DataProviderExportChunk object describing the data exported.


The ExportChunkAsync method is called to export data for site backups, page and module exports.

When a data provider is called to export data, it is called repeatedly until YetaWF.Core.DataProvider.DataProviderExportChunk.More is returned as false. Each time it is called, it is expected to export a chunk of data. The amount of data, i.e., the chunk size, is determined by the data provider.

Each time ExportChunkAsync method is called, the zero-based chunk number chunk is incremented. The data provider returns data in an instance of the YetaWF.Core.DataProvider.DataProviderExportChunk object.

Files to be exported can be added to the fileList collection. Only data records need to be added to the returned YetaWF.Core.DataProvider.DataProviderExportChunk object.

See Also YetaWF.DataProvider.FileDataProvider<KEYTYPE,OBJTYPE> ClassYetaWF.DataProvider.FileYetaWF.Core