Skip to content

IOFile.SaveAsync Method ​

Definition ​

Saves this file to a directory with the specified name asynchronously

c#
public Task<string> SaveAsync(string directory, string name, CompressionFormat compressionFormat = CompressionFormat.MrKWatkins.OakIO.Compression.CompressionFormat, CancellationToken cancellationToken = null);

View source

Parameters ​

NameTypeDescription
directoryStringThe directory to write the file to.
nameStringThe name of the file without extension.
compressionFormatCompressionFormatOptional compression format to use.
cancellationTokenCancellationTokenAn optional CancellationToken to cancel the save.

Returns ​

Task<String>

The full path of the written file.