Gets a StorageFile object to represent the specified URI app resource. For examples of sample URIs see How to load file resources.
Syntax
Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done( /* Your success and error handlers */ );
Parameters
- uri
-
Type: Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]
The URI of the app resource to get a StorageFile to represent.
Return value
Type: IAsyncOperation<StorageFile>
When this method completes, it returns a StorageFile object that represents the URI resource.
Remarks
You can use this method to access your app's resources using either "ms-appx://" or "ms-appdata://" URIs.
Examples
var uri = new Windows.Foundation.Uri("ms-appx:///datafile.xml") Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done( /* Your success and error handlers */ );
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 2/25/2013