简体   繁体   中英

How to create a folder in local drives through c# in winrt app

Can any one tell me how I can create a folder in local drives through c# code in winrt. I am creating a windows 8 app. I have to create a folder in local drives like in d drive or e drive through my winrt app to save some data in it. I don't want to create folder in local storage.

Can anyone tell me how i can achieve this.

WinRT restricts the filesystem locations that are available to applications.

See this detailed post for additional information: Accessing data and files

Short answer: WinRT restricts the locations that your app can access, and it may not be possible to do what you want.

However, if you are saving data related to your application, what are the reasons for not using local app data?

There is only one way to access file system locations that the app does not have access to. The FileOpenPicker or FolderPicker. Once a user has selected the file and folder for the backup, you can maintain this access for future use by using the Windows.Storage.AccessCache namespace and the appropriate methods. Here is a link to the related answer: Save File or Folder For Later Use .

Best of Luck

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM