Skip to content

IOFile.SaveAsync Method

Definition

Saves this file to a directory with the specified name asynchronously

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

View source

Parameters

Name Type Description
directory String The directory to write the file to.
name String The name of the file without extension.
compressionFormat CompressionFormat Optional compression format to use.
cancellationToken CancellationToken An optional CancellationToken to cancel the save.

Returns

Task<String>

The full path of the written file.