Ejemplo n.º 1
0
        private async void createLogFileAsync()
        {
            Windows.Storage.StorageFolder storageFolder =
                Windows.Storage.ApplicationData.Current.LocalFolder;
            var messageDialog = new MessageDialog(storageFolder.ToString());


            Windows.Storage.StorageFile sampleFile =
                await storageFolder.CreateFileAsync("log.txt",
                                                    Windows.Storage.CreationCollisionOption.GenerateUniqueName);

            stream = await sampleFile.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite);

            outputStream = stream.GetOutputStreamAt(0);
            dataWriter   = new Windows.Storage.Streams.DataWriter(outputStream);
        }