StorageFile.OpenAsync 方法

定义

重载

OpenAsync(FileAccessMode, StorageOpenOptions)

在指定文件上打开具有指定选项的随机访问流。

OpenAsync(FileAccessMode)

在指定文件上打开具有指定选项的随机访问流。

OpenAsync(FileAccessMode, StorageOpenOptions)

在指定文件上打开具有指定选项的随机访问流。

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)

参数

accessMode
FileAccessMode

指定要允许的访问类型的枚举值之一。

options
StorageOpenOptions

枚举值的按位组合,指定用于打开流的选项。

返回

此方法完成后,它将返回一个 IRandomAccessStream ,其中包含请求的随机访问流。

实现

属性

另请参阅

适用于

OpenAsync(FileAccessMode)

在指定文件上打开具有指定选项的随机访问流。

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)

参数

accessMode
FileAccessMode

指定要允许的访问类型的枚举值之一。

返回

此方法完成后,它将返回一个 IRandomAccessStream ,其中包含请求的随机访问流。

实现

属性

另请参阅

适用于