导出 (0) 打印
全部展开
信息
您所需的主题如下所示。但此主题未包含在此库中。

FileRandomAccessStream Class

支持对指定位置处的文件进行读取和写入。

语法


Public NotInheritable Class FileRandomAccessStream
    Implements IRandomAccessStream, _
    IDisposable, _
    IInputStream, _
    IOutputStream

特性

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

成员

FileRandomAccessStream类 具有这些类型的成员:

方法

The FileRandomAccessStream 类 具有这些方法。 对于 C#、Visual Basic 和 C++,它还继承方法于Object 类.

方法说明
CloneStream Creates a new instance of a IRandomAccessStream over the same resource as the current stream.
Close [C++, JavaScript]Closes the current stream and releases system resources.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
FlushAsync Flushes data asynchronously in a sequential stream.
GetInputStreamAt Returns an input stream at a specified location in a stream.
GetOutputStreamAt Returns an output stream at a specified location in a stream.
ReadAsync Returns an asynchronous byte reader object.
Seek Sets the position of the stream to the specified value.
WriteAsync Writes data asynchronously to a file.

 

属性

FileRandomAccessStream类 具有这些属性。

属性访问类型说明

CanRead

只读Gets a value that indicates whether the stream can be read from.

CanWrite

只读Gets a value that indicates whether the file can be written to.

Position

只读Gets the byte offset of the stream.

Size

读/写Gets or sets the size of the random access stream.

 

要求

最低支持客户端

Windows 8 [仅 Windows 应用商店应用程序]

最低支持服务器

Windows Server 2012 [仅 Windows 应用商店应用程序]

最低支持电话

Windows Phone 8

命名空间

Windows.Storage.Streams
Windows::Storage::Streams [C++]

元数据

Windows.winmd

另请参见

FileInputStream
FileOutputStream
InMemoryRandomAccessStream
RandomAccessStream

 

 

显示:
© 2014 Microsoft