GDFileIOWriteTextAsync Method (IGDStorageFile, String) |
Namespace: GD
public static IAsyncAction WriteTextAsync( IGDStorageFile file, string contents )
using GD; ... try { var file = await GDWindows.Instance.SecureFolder.CreateFileAsync("foo.bar"); if (file != null) { await GDFileIO.WriteTextAsync(file, "Swift as a shadow"); // Perform additional tasks after file is written } } // Handle errors with catch blocks catch (FileNotFoundException) { // For example, handle file not found }