String rootPath = Path.Combine(Android.OS., Android.OS.Environment.DirectoryDownloads) Void IAccessFileService.CreateFile(string FileName)īyte data = (text) Public class AccessFileImplement : IAccessFileService You could use File.Exists(xx) to check if the folder exists, and use Directory.CreateDirectory(xx) to create the folder if not. I need a create a folder first, then a text file on that folder If you target Android 10 (API level 29) or higher, set the value of android:requestLegacyExternalStorage to true in your app's manifest file. Android 10 introduced a new storage paradigm for apps called scoped storage which changes the way apps store and access files on a device's external storage. I tried this but getting System.UnauthorizedAccessException: 'Access to the path "/storage/emulated/0/Download/ myfile.txt" is denied
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |