Zend Framework  1.12
Public Member Functions | List of all members
Zend_Search_Lucene_Storage_Directory Class Reference

Public Member Functions

 close ()
 Closes the store.
 
 fileList ()
 Returns an array of strings, one for each file in the directory.
 
 createFile ($filename)
 Creates a new, empty file in the directory with the given $filename.
 
 deleteFile ($filename)
 Removes an existing $filename in the directory.
 
 purgeFile ($filename)
 Purge file if it's cached by directory object.
 
 fileExists ($filename)
 Returns true if a file with the given $filename exists.
 
 fileLength ($filename)
 Returns the length of a $filename in the directory.
 
 fileModified ($filename)
 Returns the UNIX timestamp $filename was last modified.
 
 renameFile ($from, $to)
 Renames an existing file in the directory.
 
 touchFile ($filename)
 Sets the modified time of $filename to now.
 
 getFileObject ($filename, $shareHandler=true)
 Returns a Zend_Search_Lucene_Storage_File object for a given $filename in the directory.
 

Member Function Documentation

close ( )
abstract

Closes the store.

Returns
void
createFile (   $filename)
abstract

Creates a new, empty file in the directory with the given $filename.

Parameters
string$filename
Returns
Zend_Search_Lucene_Storage_File
deleteFile (   $filename)
abstract

Removes an existing $filename in the directory.

Parameters
string$filename
Returns
void
fileExists (   $filename)
abstract

Returns true if a file with the given $filename exists.

Parameters
string$filename
Returns
boolean
fileLength (   $filename)
abstract

Returns the length of a $filename in the directory.

Parameters
string$filename
Returns
integer
fileList ( )
abstract

Returns an array of strings, one for each file in the directory.

Returns
array
fileModified (   $filename)
abstract

Returns the UNIX timestamp $filename was last modified.

Parameters
string$filename
Returns
integer
getFileObject (   $filename,
  $shareHandler = true 
)
abstract

Returns a Zend_Search_Lucene_Storage_File object for a given $filename in the directory.

If $shareHandler option is true, then file handler can be shared between File Object requests. It speed-ups performance, but makes problems with file position. Shared handler are good for short atomic requests. Non-shared handlers are useful for stream file reading (especial for compound files).

Parameters
string$filename
boolean$shareHandler
Returns
Zend_Search_Lucene_Storage_File
purgeFile (   $filename)
abstract

Purge file if it's cached by directory object.

Method is used to prevent 'too many open files' error

Parameters
string$filename
Returns
void
renameFile (   $from,
  $to 
)
abstract

Renames an existing file in the directory.

Parameters
string$from
string$to
Returns
void
touchFile (   $filename)
abstract

Sets the modified time of $filename to now.

Parameters
string$filename
Returns
void