Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

StorageFile.OpenAsync Method

Definition

Namespace:
Windows.Storage

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
OpenAsync(FileAccessMode, StorageOpenOptions)

Opens a random-access stream with the specified options over the specified file.

OpenAsync(FileAccessMode)

Opens a random-access stream with the specified options over the specified file.

OpenAsync(FileAccessMode, StorageOpenOptions)

Opens a random-access stream with the specified options over the specified file.

public:
 virtual IAsyncOperation<IRandomAccessStream ^> ^ OpenAsync(FileAccessMode accessMode, StorageOpenOptions options) = OpenAsync;
/// [Windows.Foundation.Metadata.Overload("OpenWithOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode const& accessMode, StorageOpenOptions const& options);
[Windows.Foundation.Metadata.Overload("OpenWithOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode, StorageOpenOptions options);
function openAsync(accessMode, options)
Public Function OpenAsync (accessMode As FileAccessMode, options As StorageOpenOptions) As IAsyncOperation(Of IRandomAccessStream)

Parameters

accessMode
FileAccessMode

One of the enumeration values that specifies the type of access to allow.

options
StorageOpenOptions

A bitwise combination of the enumeration values that specify options for opening the stream.

Returns

When this method completes, it returns an IRandomAccessStream that contains the requested random-access stream.

Implements

Attributes

See also

Applies to

OpenAsync(FileAccessMode)

Opens a random-access stream with the specified options over the specified file.

public:
 virtual IAsyncOperation<IRandomAccessStream ^> ^ OpenAsync(FileAccessMode accessMode) = OpenAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode const& accessMode);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode);
function openAsync(accessMode)
Public Function OpenAsync (accessMode As FileAccessMode) As IAsyncOperation(Of IRandomAccessStream)

Parameters

accessMode
FileAccessMode

One of the enumeration values that specifies the type of access to allow.

Returns

When this method completes, it returns an IRandomAccessStream that contains the requested random-access stream.

Implements

Attributes

See also

Applies to


Feedback

Was this page helpful?