Windows Store app accesses app internal files

Source: Internet
Author: User

There are several different ways to access the files inside the application . 13.1 section, you can also use the file's URI address directly to the file retrieval, this access method needs to use StorageFile static methods for classes Getfilefromapplicationuriasync , and need to provide documentation for the URI address as a parameter to the method.

< Span style= "font-family:; mso-ascii-font-family: "times New roman" "> If the file is accessed under the Application installation directory, the file's uri Span style= "font-family:; mso-ascii-font-family: "times New roman" "> address to ms-appx: uri address to be start. The sample code looks like this:

// accessing files under the application installation directory

StorageFile APPXF ile = await Storagefile.getfilefromapplicationuriasync (new Uri ("Ms-appx:///file.txt"));

// access file in the application data storage space

StorageFile Appdataf ile = await Storagefile.getfilefromapplicationuriasync (new Uri ("Ms-appdata:///local/file.txt"));

Windows Store app accesses app internal files

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.