public static async Task RenameFileAsync(StorageFile backingFile, string newName) { await backingFile.RenameAsync(newName, NameCollisionOption.GenerateUniqueName); }
async Task WriteGroups(List<string> groups) { groupFile = await roamingFolder.CreateFileAsync("GroupNames.txt.tmp", CreationCollisionOption.OpenIfExists); await FileIO.WriteLinesAsync(groupFile, groups); await groupFile.RenameAsync("GroupNames.txt", NameCollisionOption.ReplaceExisting); }