IOFile.WriteAsync Method
Overloads
WriteAsync(Stream, CancellationToken)
Writes this file to a stream asynchronously.
public Task WriteAsync(Stream stream, CancellationToken cancellationToken = null);
Parameters
Returns
Task
Writes this file to a stream asynchronously, optionally compressing it.
public Task WriteAsync(Stream stream, string filename, CompressionFormat compressionFormat, CancellationToken cancellationToken = null);
View source
| Name |
Type |
Description |
stream |
Stream |
The stream to write to. |
filename |
String |
The filename of the file, with extension. Used as the name of the entry when compressionFormat is Zip. |
compressionFormat |
CompressionFormat |
The compression format to use. |
cancellationToken |
CancellationToken |
An optional CancellationToken to cancel the writing. |
Task