WindowsRuntimeStorageExtensions.OpenStreamForWriteAsync Method (, String, )
February 14, 2014For apps that target Windows Phone OS 7.0 and 7.1, do not use any members of this type in your app. If you do, your code will throw a MethodAccessException. This type is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
[SECURITY CRITICAL]This API is not CLS-compliant. Namespace: System.IO
Retrieves a stream for writing to a file in the specified parent folder.
Assembly: System.Runtime.WindowsRuntime (in System.Runtime.WindowsRuntime.dll)
[CLSCompliantAttribute(false)] public static Task<Stream> OpenStreamForWriteAsync( this IStorageFolder rootDirectory, string relativePath, CreationCollisionOption creationCollisionOption )
- Type: Windows.Storage.IStorageFolder
The Windows RuntimeIStorageFolder object that contains the file to write to.
- Type: System.String
The path, relative to the root folder, to the file to write to.
Return ValueType: System.Threading.Tasks.Task<Stream>
A task that represents the asynchronous write operation.
Usage NoteIn Visual Basic and C#, you can call this method as an instance method on any object of type IStorageFolder. When you use instance method syntax to call this method, omit the first parameter.