StorageFile.GetFileFromApplicationUriAsync(Uri) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a StorageFile object to represent the specified Uniform Resource Identifier (URI) app resource. For examples of sample URIs see Load images and assets tailored for scale, theme, high contrast, and others.
public:
static IAsyncOperation<StorageFile ^> ^ GetFileFromApplicationUriAsync(Uri ^ uri);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<StorageFile> GetFileFromApplicationUriAsync(Uri const& uri);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<StorageFile> GetFileFromApplicationUriAsync(System.Uri uri);
function getFileFromApplicationUriAsync(uri)
Public Shared Function GetFileFromApplicationUriAsync (uri As Uri) As IAsyncOperation(Of StorageFile)
Parameters
The Uniform Resource Identifier (URI) of the app resource to get a StorageFile to represent.
Returns
When this method completes, it returns a StorageFile object that represents the Uniform Resource Identifier (URI) resource.
- Attributes
Examples
var uri = new Windows.Foundation.Uri("ms-appx:///datafile.xml")
Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done( /* Your success and error handlers */ );
Remarks
You can use this method to access your app's resources using either "ms-appx://" or "ms-appdata://" Uniform Resource Identifier (URI).