So as title states, I would like to create a simple text file, that I could write to from my C# application, and copy it to my PC trough an USB cable.
Just to be clear, I would like to write a file to this place, because I can access this from my PC.
There is a capability for writing to the Documents folder on the phone, but adding it to your manifest would cause your app to fail the certification process in the Windows Phone Store.
The capability is called documentsLibrary
<Capability Name="documentsLibrary" />
If you declare it, you can then read and write files in KnownFolders.DocumentsLibrary
.
You have access to the public - documents folder from the windwsphone. Look at the following code-snippet (details: https://stackoverflow.com/a/15625701/2653134 )
var folder = ApplicationData.Current.LocalFolder;
var file = await folder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.