You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: StreamFileHeadersAsync

StreamFileHeadersAsync is used to stream the headers of files which match the criteria chosen from a file system.

Syntax

Task<IAsyncEnumerator<FileHeader>> StreamFileHeadersAsync(Etag fromEtag, int pageSize = int.MaxValue);

Parameters
fromEtag Etag ETag of a file from which the stream should start
pageSize int The maximum number of file headers that will be retrieved

Return Value
Task<IAsyncEnumerator<FileHeader>> A task that represents the asynchronous operation. The task result is the enumerator of FileHeaders objects.

Example

using (var reader = await store.AsyncFilesCommands.StreamFileHeadersAsync(Etag.Empty))
{
	while (await reader.MoveNextAsync())
	{
		FileHeader header = reader.Current;
	}
}