StorageFile.ReplaceWithStreamedFileFromUriAsync 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.
Replaces the contents of the file referred to by the specified IStorageFile object with a new data stream of the specified Uniform Resource Identifier (URI). This method lets the app download the data on-demand when the StorageFile that represents the stream is first accessed.
The data stream is accessed through the StorageFile that is returned and the data is downloaded on-demand when the StorageFile is first accessed.
Replaces the IStorageFile object that represents the specified file with a new StorageFile that provides a stream of the specified Uniform Resource Identifier (URI).
public:
static IAsyncOperation<StorageFile ^> ^ ReplaceWithStreamedFileFromUriAsync(IStorageFile ^ fileToReplace, Uri ^ uri, IRandomAccessStreamReference ^ thumbnail);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<StorageFile> ReplaceWithStreamedFileFromUriAsync(IStorageFile const& fileToReplace, Uri const& uri, IRandomAccessStreamReference const& thumbnail);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<StorageFile> ReplaceWithStreamedFileFromUriAsync(IStorageFile fileToReplace, System.Uri uri, IRandomAccessStreamReference thumbnail);
function replaceWithStreamedFileFromUriAsync(fileToReplace, uri, thumbnail)
Public Shared Function ReplaceWithStreamedFileFromUriAsync (fileToReplace As IStorageFile, uri As Uri, thumbnail As IRandomAccessStreamReference) As IAsyncOperation(Of StorageFile)
- fileToReplace
- IStorageFile
The file that the created StorageFile will provide a stream of.
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 streamed file. Subsequently, this StorageFile object should be used to access file content instead of the file (type IStorageFile) that was specified to be replace.
- Attributes
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 |