System.IO.InTheHandRuntimeStorageExtensions.OpenStreamForWriteAsync C# (CSharp) Méthode

OpenStreamForWriteAsync() public static méthode

Retrieves a stream for writing to a specified file.
public static OpenStreamForWriteAsync ( this windowsRuntimeFile ) : Task
windowsRuntimeFile this The Windows Runtime IStorageFile object to write to.
Résultat Task
        public static Task<Stream> OpenStreamForWriteAsync(this IStorageFile windowsRuntimeFile)
        {
#if WINDOWS_UWP || WINDOWS_APP || WINDOWS_PHONE_APP || WINDOWS_PHONE
            return WindowsRuntimeStorageExtensions.OpenStreamForWriteAsync((global::Windows.Storage.StorageFile)((StorageFile)windowsRuntimeFile));
#elif __ANDROID__ || __UNIFIED__ || WIN32
            if (windowsRuntimeFile == null)
            {
                throw new ArgumentNullException("windowsRuntimeFile");
            }

            return Task.FromResult<Stream>(global::System.IO.File.OpenWrite(windowsRuntimeFile.Path));
#else
            throw new PlatformNotSupportedException();
#endif
        }

Same methods

InTheHandRuntimeStorageExtensions::OpenStreamForWriteAsync ( this rootDirectory, string relativePath, CreationCollisionOption creationCollisionOption ) : Task
InTheHandRuntimeStorageExtensions