HumHub Documentation (unofficial)

AbstractFile
in package
implements FileInterface

AbstractYes
Tags
category

Zend

subpackage

Storage

Table of Contents

Interfaces

FileInterface

Methods

readBinary()  : string
Reads binary data from the current position in the file and advances the file pointer.
readByte()  : int
Reads a byte from the current position in the file and advances the file pointer.
readBytes()  : string
Read num bytes from the current position in the file and advances the file pointer.
readInt()  : int
Reads an integer from the current position in the file and advances the file pointer.
readLong()  : int|float
Returns a long integer from the current position in the file and advances the file pointer.
readString()  : string
Reads a string from the current position in the file and advances the file pointer.
readVInt()  : int
Returns a variable-length integer from the current position in the file and advances the file pointer.
writeByte()  : mixed
Writes a byte to the end of the file.
writeBytes()  : void
Writes num bytes of data (all, if $num===null) to the end of the string.
writeInt()  : void
Writes an integer to the end of file.
writeLong()  : void
Writes long integer to the end of file
writeString()  : void
Writes a string to the end of file.
writeVInt()  : void
Writes a variable-length integer to the end of file.
_readLong32Bit()  : int|float
Returns a long integer from the current position in the file, advances the file pointer and return it as float (for 32-bit platforms).
_writeLong32Bit()  : void
Writes long integer to the end of file (32-bit platforms implementation)
fread()  : string
fwrite()  : void

Methods

readBinary()

Reads binary data from the current position in the file and advances the file pointer.

public readBinary() : string
Return values
string

readByte()

Reads a byte from the current position in the file and advances the file pointer.

public readByte() : int
Return values
int

readBytes()

Read num bytes from the current position in the file and advances the file pointer.

public readBytes(int $num) : string
Parameters
$num : int
Return values
string

readInt()

Reads an integer from the current position in the file and advances the file pointer.

public readInt() : int
Return values
int

readLong()

Returns a long integer from the current position in the file and advances the file pointer.

public readLong() : int|float
Return values
int|float

readString()

Reads a string from the current position in the file and advances the file pointer.

public readString() : string
Return values
string

readVInt()

Returns a variable-length integer from the current position in the file and advances the file pointer.

public readVInt() : int
Return values
int

writeByte()

Writes a byte to the end of the file.

public writeByte(int $byte) : mixed
Parameters
$byte : int

writeBytes()

Writes num bytes of data (all, if $num===null) to the end of the string.

public writeBytes(string $data[, int $num = null ]) : void
Parameters
$data : string
$num : int = null

writeInt()

Writes an integer to the end of file.

public writeInt(int $value) : void
Parameters
$value : int

writeLong()

Writes long integer to the end of file

public writeLong(int $value) : void
Parameters
$value : int

writeVInt()

Writes a variable-length integer to the end of file.

public writeVInt(int $value) : void
Parameters
$value : int

_readLong32Bit()

Returns a long integer from the current position in the file, advances the file pointer and return it as float (for 32-bit platforms).

protected _readLong32Bit() : int|float
Tags
throws
RuntimeException
Return values
int|float

_writeLong32Bit()

Writes long integer to the end of file (32-bit platforms implementation)

protected _writeLong32Bit(int|float $value) : void
Parameters
$value : int|float
Tags
throws
RuntimeException

fread()

protected abstract fread([int $length = 1 ]) : string
Parameters
$length : int = 1
Return values
string

fwrite()

protected abstract fwrite(mixed $data[, mixed $length = null ]) : void
Parameters
$data : mixed
$length : mixed = null

        
On this page

Search results