Table of Contents

Class CloudFileStream

Namespace
Microsoft.WindowsAzure.Storage.File
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents a stream for writing to a file.

public abstract class CloudFileStream : Stream, IDisposable, IAsyncDisposable
Inheritance
CloudFileStream
Implements
Inherited Members

Constructors

CloudFileStream()

protected CloudFileStream()

Methods

BeginCommit(AsyncCallback, object)

Begins an asynchronous commit operation.

public abstract ICancellableAsyncResult BeginCommit(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An optional asynchronous callback, to be called when the commit is complete.

state object

A user-provided object that distinguishes this particular asynchronous commit request from other requests.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that represents the asynchronous commit, which could still be pending.

BeginFlush(AsyncCallback, object)

Begins an asynchronous flush operation.

public abstract ICancellableAsyncResult BeginFlush(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An optional asynchronous callback, to be called when the flush is complete.

state object

A user-provided object that distinguishes this particular asynchronous flush request from other requests.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that represents the asynchronous flush, which could still be pending.

Commit()

Clears all buffers for this stream, causes any buffered data to be written to the underlying file, and commits the file.

public abstract void Commit()

EndCommit(IAsyncResult)

Waits for the pending asynchronous commit to complete.

public abstract void EndCommit(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

The reference to the pending asynchronous request to finish.

EndFlush(IAsyncResult)

Waits for the pending asynchronous flush to complete.

public abstract void EndFlush(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

The reference to the pending asynchronous request to finish.