Home > Backend Development > C++ > How Can Windows 10 Universal Apps Access Files and Directories Beyond App Storage Restrictions?

How Can Windows 10 Universal Apps Access Files and Directories Beyond App Storage Restrictions?

Linda Hamilton
Release: 2025-01-09 22:27:41
Original
148 people have browsed it

How Can Windows 10 Universal Apps Access Files and Directories Beyond App Storage Restrictions?

Windows 10 Universal App File/Directory Access

Access files and directories outside the application storage area

In Universal Windows Apps (UWP), file and directory access is limited to specific locations, including directories declared in the manifest, user-selected folders (via FileOpenPicker or FolderPicker), and files in a FutureAccessList. However, there are ways to access files outside these designated areas.

Use FolderPicker and FutureAccessList

One way is to use FolderPicker to let the user manually select the desired directory. This will grant your app access to all files and folders in that directory.

Alternatively, you can add selected directories to a FutureAccessList to make them accessible even after an app restart.

AppExecutionAlias ​​and broadFileSystemAccess

In Windows 10 version 1803, additional file system access features were introduced:

  • AppExecutionAlias: UWP apps that declare AppExecutionAlias ​​can implicitly access files and folders in the current working directory.
  • broadFileSystemAccess: This feature grants an app full file system access, similar to the user running the app. However, this feature requires a detailed justification when submitting your app to the Microsoft Store.

Note: An app must be able to handle the user's consent prompt when it requests access to a file outside of the default permissions.

The above is the detailed content of How Can Windows 10 Universal Apps Access Files and Directories Beyond App Storage Restrictions?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template