点击或拖拽改变大小

XsWin32FileStream 类

X#
This class is used for Shared diskaccess on Windows.
继承层次
Object
  MarshalByRefObject
    Stream
      FileStream
        XsFileStream
          XsWin32FileStream

命名空间:  XSharp.IO
程序集:  XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法
 CLASS XsWin32FileStream INHERIT XsFileStream
查看代码

XsWin32FileStream 类型公开以下成员。

属性
  名称说明
公共属性FileName
The name of the file opened in the stream.
(继承自 XsFileStream。)
公共属性Length
Gets the length in bytes of the stream.
(重写 Length.)
Top
方法
  名称说明
公共方法Flush
Clears buffers for this stream and causes any buffered data to be written to the file.
(重写 Flush.)
公共方法Flush(Boolean)
Clears buffers for this stream and causes any buffered data to be written to the file, and also clears all intermediate file buffers.
(重写 Flush(Boolean).)
公共方法Lock
Prevents other processes from reading from or writing to the FileStream.
(重写 Lock(Int64, Int64).)
公共方法Read
Reads a block of bytes from the stream and writes the data in a given buffer.
(重写 Read(Byte, Int32, Int32).)
公共方法Seek
Sets the current position of this stream to the given value.
(重写 Seek(Int64, SeekOrigin).)
公共方法SetLength
Sets the length of this stream to the given value.
(重写 SetLength(Int64).)
公共方法Unlock
Allows access by other processes to all or part of a file that was previously locked.
(重写 Unlock(Int64, Int64).)
公共方法Write
Writes a block of bytes to the file stream.
(重写 Write(Byte, Int32, Int32).)
公共方法WriteByte
Writes a byte to the current position in the file stream.
(重写 WriteByte(Byte).)
Top
扩展方法
  名称说明
公共扩展器方法SafeLock
Locks a region in a stream. Contains TRY CATCH mechanism.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeRead(Byte)已重载。
Read data from a stream. Assumes that the whole buffer must be read. Reads from current location.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeRead(Byte, Int32)已重载。
Read data from a stream. Contains TRY CATCH mechanism. Reads from current location.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeRead(Byte, Int32, Int32)已重载。
Read data from a stream. Contains TRY CATCH mechanism. Reads from current location.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeReadAt(Int64, Byte)已重载。
Read data at a location in the file. Makes sure that file locations are >= 0. Assumes whole buffer must be read.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeReadAt(Int64, Byte, Int32)已重载。
Read data at a location in the file. Makes sure that file locations are >= 0
(由 FileStreamExensions 定义。)
公共扩展器方法SafeSetLength
Sets the length of a stream. Contains TRY CATCH mechanism.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeSetPos
Sets the location of a stream. Contains TRY CATCH mechanism. .
(由 FileStreamExensions 定义。)
公共扩展器方法SafeUnlock
Unlocks a region in a stream. Contains TRY CATCH mechanism.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeWrite(Byte)已重载。
Write data to a stream. Contains TRY CATCH mechanism. Writes to the current location. Assumes the whole buffer must be written.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeWrite(Byte, Int32)已重载。
Write data to a stream. Contains TRY CATCH mechanism. Writes to the current location.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeWriteAt(Int64, Byte)已重载。
Write data at a location in the file. Makes sure that file locations are >= 0. Assumes whole buffer must be written.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeWriteAt(Int64, Byte, Int32)已重载。
Write data at a location in the file. Makes sure that file locations are >= 0.
(由 FileStreamExensions 定义。)
公共扩展器方法SafeWriteByte
Write data to a stream. Contains TRY CATCH mechanism. Writes to the current location.
(由 FileStreamExensions 定义。)
Top
备注
The class bypasses some of the default methods in the FileStraem class and directly uses calls to OS functions to make sure that changes made by other users are visible and not hidden because of caching in the .Net FileStream class.
参见