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.
Afficher le fichier Open project: xyzzer/WinRTXamlToolkit

Méthodes publiques

Méthode 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 méthode

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.
Résultat Task

SaveAsync() public static méthode

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. ///
Résultat System.Threading.Tasks.Task