C# Class WinRTXamlToolkit.IO.Extensions.StringIOExtensions

Extensions for simple writing and reading of strings to/from files.
Note that these were created before FileIO class existed in WinRT, but they still serve a purpose.
Mostra file Open project: xyzzer/WinRTXamlToolkit

Public Methods

Method Description
LoadAsync ( string fileName, StorageFolder folder = null ) : Task

Reads a string from a text file.

SaveAsync ( this text, string fileName, StorageFolder folder = null, CreationCollisionOption options = CreationCollisionOption.ReplaceExisting ) : System.Threading.Tasks.Task

Writes a string to a text file.

Method Details

LoadAsync() public static method

Reads a string from a text file.
public static LoadAsync ( string fileName, StorageFolder folder = null ) : Task
fileName string Name of the file.
folder Windows.Storage.StorageFolder The folder.
return Task

SaveAsync() public static method

Writes a string to a text file.
public static SaveAsync ( this text, string fileName, StorageFolder folder = null, CreationCollisionOption options = CreationCollisionOption.ReplaceExisting ) : System.Threading.Tasks.Task
text this The text to write.
fileName string Name of the file.
folder Windows.Storage.StorageFolder The folder.
options CreationCollisionOption /// The enum value that determines how responds if the fileName is the same /// as the name of an existing file in the current folder. Defaults to ReplaceExisting. ///
return System.Threading.Tasks.Task