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

 Methods

Closes the store.

close() : void

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

createFile(string $filename) : \Zend_Search_Lucene_Storage_File

Parameters

$filename

string

Returns

\Zend_Search_Lucene_Storage_File

Removes an existing $filename in the directory.

deleteFile(string $filename) : void

Parameters

$filename

string

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

fileExists(string $filename) : boolean

Parameters

$filename

string

Returns

boolean

Returns the length of a $filename in the directory.

fileLength(string $filename) : integer

Parameters

$filename

string

Returns

integer

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

fileList() : array

Returns

array

Returns the UNIX timestamp $filename was last modified.

fileModified(string $filename) : integer

Parameters

$filename

string

Returns

integer

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

getFileObject(string $filename, boolean $shareHandler = true) : \Zend_Search_Lucene_Storage_File

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

$filename

string

$shareHandler

boolean

Returns

\Zend_Search_Lucene_Storage_File

Purge file if it's cached by directory object

purgeFile(string $filename) : void

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

Parameters

$filename

string

Renames an existing file in the directory.

renameFile(string $from, string $to) : void

Parameters

$from

string

$to

string

Sets the modified time of $filename to now.

touchFile(string $filename) : void

Parameters

$filename

string