FileOutputStream FileOutputStream FileOutputStream FileOutputStream Class

Writes data to a file.

Syntax

Declaration

public sealed class FileOutputStreampublic sealed class FileOutputStreamPublic NotInheritable Class FileOutputStreampublic sealed class FileOutputStream

Methods summary

Closes the current stream and releases system resources.

Flushes data asynchronously in a sequential stream.

Writes data asynchronously to a file.

Methods

  • Close()
    Close()
    Close()
    Close()

    Closes the current stream and releases system resources.

    public void Close()public void Close()Public Function Close() As voidpublic void Close()
  • FlushAsync()
    FlushAsync()
    FlushAsync()
    FlushAsync()

    Flushes data asynchronously in a sequential stream.

    public IAsyncOperation<bool> FlushAsync()public IAsyncOperation<bool> FlushAsync()Public Function FlushAsync() As IAsyncOperation( Of bool )public IAsyncOperation<bool> FlushAsync()

    Returns

    • The stream flush operation.

  • WriteAsync(IBuffer)
    WriteAsync(IBuffer)
    WriteAsync(IBuffer)
    WriteAsync(IBuffer)

    Writes data asynchronously to a file.

    public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)Public Function WriteAsync(buffer As IBuffer) As IAsyncOperationWithProgress( Of uint, uint )public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)

    Parameters

    Returns

    • The byte writer operation.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.Storage.Streams.dll