Search/Lucene/Storage/Directory.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Search_Lucene
- Subpackage
- Storage
- Version
- $Id$
\Zend_Search_Lucene_Storage_Directory
Package: Zend_Search_Lucene\Storage![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
Returns
![](../images/icons/arrow_right.png)
![](../images/icons/arrow_right.png)
- Children
- \Zend_Search_Lucene_Storage_Directory_Filesystem
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
createFile(string $filename) : \Zend_Search_Lucene_Storage_File
abstract
Creates a new, empty file in the directory with the given $filename.
Parameters
Returns
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
\Zend_Search_Lucene_Storage_File |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
deleteFile(string $filename) : void
abstract
Removes an existing $filename in the directory.
Parameters
Name | Type | Description |
---|---|---|
$filename | string |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
fileExists(string $filename) : boolean
abstract
Returns true if a file with the given $filename exists.
Parameters
Returns
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
boolean |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
fileLength(string $filename) : integer
abstract
Returns the length of a $filename in the directory.
Parameters
Returns
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
integer |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
fileList() : array
abstract
Returns an array of strings, one for each file in the directory.
Returns
Type | Description |
---|---|
array |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
fileModified(string $filename) : integer
abstract
Returns the UNIX timestamp $filename was last modified.
Parameters
Returns
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
integer |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
getFileObject(string $filename, boolean $shareHandler = true) : \Zend_Search_Lucene_Storage_File
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).
ParametersName | Type | Description |
---|---|---|
$filename | string | |
$shareHandler | boolean |
Type | Description |
---|---|
\Zend_Search_Lucene_Storage_File |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
purgeFile(string $filename) : void
abstract
Purge file if it's cached by directory object
Method is used to prevent 'too many open files' error
ParametersName | Type | Description |
---|---|---|
$filename | string |
![](../images/icons/arrow_right.png)
![method method](../images/icons/method.png)
renameFile(string $from, string $to) : void
abstract
Renames an existing file in the directory.
Parameters
Name | Type | Description |
---|---|---|
$from | string | |
$to | string |