first of all I really hope I'm not asking already answered question, I did my research on stack overflow and beyond and so far didn't find answer to my question.
I finally accomplished that my Universal windows (10) app makes a project folder for user, inside LocalState folder, but its fine as long as it stays there. Now, I'm trying to generate some simple text file and save in "Project" folder, example path: LocalState\Project1\example.txt.
I tried with following code:
StorageFolder mapa_projekta = ApplicationData.Current.LocalFolder;
StorageFile sampleFile = await mapa_projekta.CreateFileAsync("sample.txt");
First, we can make the project folder:
StorageFolder rootFolder = ApplicationData.Current.LocalFolder; var projectFolderName = "Project1"; StorageFolder projectFolder = await rootFolder.CreateFolderAsync(projectFolderName, CreationCollisionOption.ReplaceIfExisting);
Then, you can create your file within your subfolder:
StorageFile sampleFile = await projectFolder.CreateFileAsync("sample.txt");