Click or drag to resize
GDStorageFileGetFileFromApplicationUriAsync Method
Gets a GDStorageFile object to represent the specified URI secure container resource.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public static IAsyncOperation<GDStorageFile> GetFileFromApplicationUriAsync(
	Uri uri
)

Parameters

uri
Type: SystemUri
The URI of the app resource to get a GDStorageFile to represent.

Return Value

Type: IAsyncOperationGDStorageFile
When this method completes, it returns a GDStorageFile object that represents the URI resource.
Exceptions
ExceptionCondition
Exception(C# equivalent: System.IO.FileNotFoundException) The specified file does not exist. Check the value of uri (HResult ERROR_FILE_NOT_FOUND).
InvalidArgumentException(C# equivalent: System.ArgumentException) The URI uses unsupported scheme.
Remarks
You can use this method to access your secure container resources using gd-sc:// protocol.
Examples
The following example shows how to access file from SDK secure storage using URI.
using GD;
...
await GDWindows.Instance.SecureFolder.CreateFileAsync(@"foo\bar\test.txt");
var gdFile = await GDStorageFile.GetFileFromApplicationUriAsync(new Uri("gd-sc:///foo/bar/test.txt"));
See Also