category Zend
package Zend_Search_Lucene
subpackage Storage
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Search_Lucene_Storage_File

 Methods

Class constructor. Open the file.

__construct(string $filename, string $mode = 'r+b'

Parameters

$filename

string

$mode

string

Close File object

close() 

Flush output.

flush() : boolean

Returns true on success or false on failure.

inherited_from \Zend_Search_Lucene_Storage_File::flush()

Returns

boolean

Flush output.

flush() : boolean
Inherited

Returns true on success or false on failure.

Returns

boolean

Lock file

lock(integer $lockType, boolean $nonBlockingLock = false) : boolean

Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock)

inherited_from \Zend_Search_Lucene_Storage_File::lock()

Parameters

$lockType

integer

$nonBlockingLock

boolean

Returns

boolean

Lock file

lock(integer $lockType, $nonBlockinLock = false) : boolean
Inherited

Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock)

Parameters

$lockType

integer

$nonBlockinLock

Returns

boolean

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

readBinary() : string
Inherited

Returns

string

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

readByte() : integer
Inherited

Returns

integer

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

readBytes(integer $num) : string
Inherited

Parameters

$num

integer

Returns

string

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

readInt() : integer
Inherited

Returns

integer

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

readLong() : integer | float
Inherited

Exceptions

\Zend_Search_Lucene_Exception

Returns

integerfloat

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

readLong32Bit() : integer | float
Inherited

Exceptions

\Zend_Search_Lucene_Exception

Returns

integerfloat

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

readString() : string
Inherited

Returns

string

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

readVInt() : integer
Inherited

Returns

integer

Sets the file position indicator and advances the file pointer.

seek(integer $offset, integer $whence = SEEK_SET) : integer

The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. (To move to a position before the end-of-file, you need to pass a negative value in offset.) SEEK_CUR is the only supported offset type for compound files

Upon success, returns 0; otherwise, returns -1

inherited_from \Zend_Search_Lucene_Storage_File::seek()

Parameters

$offset

integer

$whence

integer

Returns

integer

Sets the file position indicator and advances the file pointer.

seek(integer $offset, integer $whence = SEEK_SET) : integer
Inherited

The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. (To move to a position before the end-of-file, you need to pass a negative value in offset.) Upon success, returns 0; otherwise, returns -1

Parameters

$offset

integer

$whence

integer

Returns

integer

Get the size of the already opened file

size() : integer

Returns

integer

Get file position.

tell() : integer
inherited_from \Zend_Search_Lucene_Storage_File::tell()

Returns

integer

Get file position.

tell() : integer
Inherited

Returns

integer

Unlock file

unlock() : boolean

Returns true on success

inherited_from \Zend_Search_Lucene_Storage_File::unlock()

Returns

boolean

Unlock file

unlock() 
Inherited

Writes a byte to the end of the file.

writeByte(integer $byte) 
Inherited

Parameters

$byte

integer

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

writeBytes(string $data, integer $num = null
Inherited

Parameters

$data

string

$num

integer

Writes an integer to the end of file.

writeInt(integer $value) 
Inherited

Parameters

$value

integer

Writes long integer to the end of file

writeLong(integer $value) 
Inherited

Parameters

$value

integer

Exceptions

\Zend_Search_Lucene_Exception

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

writeLong32Bit(integer|float $value) 
Inherited

Parameters

$value

integerfloat

Exceptions

\Zend_Search_Lucene_Exception

Writes a string to the end of file.

writeString(string $str) 
Inherited

Parameters

$str

string

Exceptions

\Zend_Search_Lucene_Exception

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

writeVInt(integer $value) 
Inherited

Parameters

$value

integer

Read a $length bytes from the file and advance the file pointer.

_fread(integer $length = 1) : string
inherited_from \Zend_Search_Lucene_Storage_File::_fread()

Parameters

$length

integer

Returns

string

Reads $length number of bytes at the current position in the file and advances the file pointer.

_fread(integer $length = 1) : string
Inherited

Parameters

$length

integer

Returns

string

Writes $length number of bytes (all, if $length===null) to the end of the file.

_fwrite(string $data, integer $length = null
inherited_from \Zend_Search_Lucene_Storage_File::_fwrite()

Parameters

$data

string

$length

integer

Writes $length number of bytes (all, if $length===null) to the end of the file.

_fwrite(string $data, integer $length = null
Inherited

Parameters

$data

string

$length

integer

 Properties

 

Resource of the open file

$_fileHandle : resource

Default