Writing to a text file. RRS feed

  • Question

  • Hi there,

    I'm having a problem writing to a txt file. When I call a function to do the writing, the txt file doesn't actually get written to. There aren't any errors, or exceptions and as far as I can tell it is picking up the file, but it won't write to it. It stays empty.

    var uri = new Windows.Foundation.Uri("ms-appx:///favs.txt");
    var encoding = Windows.Storage.Streams.UnicodeEncoding.utf8;
        function (file) {
            Windows.Storage.FileIO.writeTextAsync(file, "goats", encoding);

    Am I doing it wrong? That's my latest version of the function but I have tried a few other things too.


    Tuesday, July 15, 2014 1:14 AM


All replies