StorageFile.CreateStreamedFileFromUriAsync Method
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.
Creates a StorageFile to represent a stream of data from the specified Uniform Resource Identifier (URI) resource. This method lets the app download the data on-demand when the StorageFile that represents the stream is first accessed.
public:
static IAsyncOperation<StorageFile ^> ^ CreateStreamedFileFromUriAsync(Platform::String ^ displayNameWithExtension, Uri ^ uri, IRandomAccessStreamReference ^ thumbnail);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<StorageFile> CreateStreamedFileFromUriAsync(winrt::hstring const& displayNameWithExtension, Uri const& uri, IRandomAccessStreamReference const& thumbnail);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<StorageFile> CreateStreamedFileFromUriAsync(string displayNameWithExtension, System.Uri uri, IRandomAccessStreamReference thumbnail);
function createStreamedFileFromUriAsync(displayNameWithExtension, uri, thumbnail)
Public Shared Function CreateStreamedFileFromUriAsync (displayNameWithExtension As String, uri As Uri, thumbnail As IRandomAccessStreamReference) As IAsyncOperation(Of StorageFile)
- displayNameWithExtension
-
String
Platform::String
winrt::hstring
The user-friendly name of the StorageFile to create, including a file type extension.
The Uniform Resource Identifier (URI) of the resource used to create the StorageFile.
- thumbnail
- IRandomAccessStreamReference
The thumbnail image for the StorageFile to create.
For a high-quality thumbnail, one edge of this thumbnail should be at least 1024 pixels.
When this method completes, it returns a StorageFile object that represents the Uniform Resource Identifier (URI) resource.
- Attributes
This method is nearly equivalent to CreateStreamedFileAsync, except when using this method, the system provides a StreamedFileDataRequestedHandler on the app's behalf and implements this function to download the specified Uri into the streamed file.
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |