Discuss this help topic in SecureBlackbox Forum

TElCustomFileSystemAdapter.FileRead

TElCustomFileSystemAdapter     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Reads a block of data from the file and writes it to the given buffer.

Declaration

[C#]
    int FileRead(Object FileHandle, byte[] Buffer, int Index, int Size, ref int ErrorCode);

[VB.NET]
    Function FileRead(ByVal FileHandle As Object, ByVal Buffer As Byte(), ByVal Index As Integer, ByVal Size As Integer, ByRef ErrorCode As Integer) As Integer

[Pascal]
    function FileRead(FileHandle : TObject; Buffer : ByteArray; Index, Size : integer) : integer; virtual; abstract;

[C++]
    int32_t FileRead(TObject &FileHandle, const std::vector<uint8_t> &Buffer, int32_t Index, int32_t Size, int32_t &ErrorCode);
    int32_t FileRead(TObject *FileHandle, const std::vector<uint8_t> &Buffer, int32_t Index, int32_t Size, int32_t &ErrorCode);

[PHP]
    integer FileRead(TObject $FileHandle, array of byte|string|NULL $Buffer, integer $Index, integer $Size, integer &$ErrorCode)

[Java]
    int fileRead(TObject arg0, byte[] arg1, int arg2, int arg3, TSBInteger arg4);

Parameters

  • FileHandle - the handle of the file to be read.
  • Buffer - the buffer where the read data will be placed.
  • Index - the byte offset in Buffer where the read bytes will be placed.
  • Size - the maximum number of bytes to read.
  • ErrorCode -

Return value

    Returns the number of bytes that were actually read.

Description

    Use this method to read data from the file. The requested number of bytes are read and placed to the buffer starting from the desired offset (Index).

See also:     FileOpen     FileWrite    

Discuss this help topic in SecureBlackbox Forum