Replaces the contents of the file referred to by the specified IStorageFile object with a new data stream of the specified 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 URI.
Syntax
Windows.Storage.StorageFile.replaceWithStreamedFileFromUriAsync(fileToReplace, uri, thumbnail).done( /* Your success and error handlers */ );
Parameters
- fileToReplace
-
Type: IStorageFile
The file that the created StorageFile will provide a stream of.
- uri
-
Type: Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]
The URI of the resource used to create the StorageFile.
- thumbnail
-
Type: 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.
Return value
Type: IAsyncOperation<StorageFile>
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.
Remarks
Windows Phone 8
This API is not implemented and will throw an exception if called.
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