StorageFile.OpenAsync Method
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.
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. |
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
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
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
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |