XsWin32FileStream.Seek 方法 | |
Sets the current position of this stream to the given value.
命名空间:
XSharp.IO
程序集:
XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法 VIRTUAL METHOD Seek(
offset AS INT64,
origin AS SeekOrigin
) AS INT64
public override long Seek(
long offset,
SeekOrigin origin
)
查看代码参数
- offset
- 类型:Int64
The point relative to origin from which to begin seeking. - origin
- 类型:SeekOrigin
Specifies the beginning, the end, or the current position as a reference point for offset, using a value of type SeekOrigin.
返回值
类型:
Int64The new position in the stream.
异常 异常 | 条件 |
---|
IOException | An I/O error occurred. |
NotSupportedException | The stream does not support seeking, such as if the FileStream is constructed from a pipe or console output. |
ArgumentException | Seeking is attempted before the beginning of the stream. |
ObjectDisposedException | Methods were called after the stream was closed. |
备注 This method calls the Windows SetFilePointerEx() function directly.
参见