Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Search_Lucene_Storage_File_Filesystem Class Reference

Public Member Functions

 __construct ($filename, $mode='r+b')
 Class constructor.
 
 seek ($offset, $whence=SEEK_SET)
 Sets the file position indicator and advances the file pointer.
 
 tell ()
 Get file position.
 
 flush ()
 Flush output.
 
 close ()
 Close File object.
 
 size ()
 Get the size of the already opened file.
 
 lock ($lockType, $nonBlockingLock=false)
 Lock file.
 
 unlock ()
 Unlock file.
 
- Public Member Functions inherited from Zend_Search_Lucene_Storage_File
 seek ($offset, $whence=SEEK_SET)
 Sets the file position indicator and advances the file pointer.
 
 tell ()
 Get file position.
 
 flush ()
 Flush output.
 
 lock ($lockType, $nonBlockinLock=false)
 Lock file.
 
 unlock ()
 Unlock file.
 
 readByte ()
 Reads a byte from the current position in the file and advances the file pointer.
 
 writeByte ($byte)
 Writes a byte to the end of the file.
 
 readBytes ($num)
 Read num bytes from the current position in the file and advances the file pointer.
 
 writeBytes ($data, $num=null)
 Writes num bytes of data (all, if $num===null) to the end of the string.
 
 readInt ()
 Reads an integer from the current position in the file and advances the file pointer.
 
 writeInt ($value)
 Writes an integer to the end of file.
 
 readLong ()
 Returns a long integer from the current position in the file and advances the file pointer.
 
 writeLong ($value)
 Writes long integer to the end of file.
 
 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).
 
 writeLong32Bit ($value)
 Writes long integer to the end of file (32-bit platforms implementation)
 
 readVInt ()
 Returns a variable-length integer from the current position in the file and advances the file pointer.
 
 writeVInt ($value)
 Writes a variable-length integer to the end of file.
 
 readString ()
 Reads a string from the current position in the file and advances the file pointer.
 
 writeString ($str)
 Writes a string to the end of file.
 
 readBinary ()
 Reads binary data from the current position in the file and advances the file pointer.
 

Protected Member Functions

 _fread ($length=1)
 Read a $length bytes from the file and advance the file pointer.
 
 _fwrite ($data, $length=null)
 Writes $length number of bytes (all, if $length===null) to the end of the file.
 
- Protected Member Functions inherited from Zend_Search_Lucene_Storage_File
 _fread ($length=1)
 Reads $length number of bytes at the current position in the file and advances the file pointer.
 
 _fwrite ($data, $length=null)
 Writes $length number of bytes (all, if $length===null) to the end of the file.
 

Protected Attributes

 $_fileHandle
 

Constructor & Destructor Documentation

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

Class constructor.

Open the file.

Parameters
string$filename
string$mode

Member Function Documentation

_fread (   $length = 1)
protected

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

Parameters
integer$length
Returns
string
_fwrite (   $data,
  $length = null 
)
protected

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

Parameters
string$data
integer$length
close ( )

Close File object.

flush ( )

Flush output.

Returns true on success or false on failure.

Returns
boolean
lock (   $lockType,
  $nonBlockingLock = false 
)

Lock file.

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

Parameters
integer$lockType
boolean$nonBlockingLock
Returns
boolean
seek (   $offset,
  $whence = SEEK_SET 
)

Sets the file position indicator and advances the file pointer.

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

Parameters
integer$offset
integer$whence
Returns
integer
size ( )

Get the size of the already opened file.

Returns
integer
tell ( )

Get file position.

Returns
integer
unlock ( )

Unlock file.

Returns true on success

Returns
boolean

Member Data Documentation

$_fileHandle
protected