API Documentation

Search/Lucene/Storage/Directory/Filesystem.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Search_Lucene
subpackage
Storage
version
$Id: Filesystem.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Search_Lucene_Storage_Directory_Filesystem

Description

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 license@zend.com so we can send you a copy immediately.

Zend_Search_Lucene_Storage_Directory_Filesystem

Extends from
Zend_Search_Lucene_Storage_Directory
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Search_Lucene
subpackage
Storage
Properties
$_dirPath
$_fileHandlers
$_defaultFilePermissions
Methods
getDefaultFilePermissions
setDefaultFilePermissions
mkdirs
__construct
close
fileList
createFile
deleteFile
purgeFile
fileExists
fileLength
fileModified
renameFile
touchFile
getFileObject

Description

FileSystem implementation of Directory abstraction.

Properties

$_defaultFilePermissions

integer $_defaultFilePermissions = '0666'

Default file permissions

Details

$_defaultFilePermissions
integer
visibility
protected
default
0666
final
false
static
true

$_dirPath

string $_dirPath = 'null'

Filesystem path to the directory

Details

$_dirPath
string
visibility
protected
default
null
final
false
static
false

$_fileHandlers

array $_fileHandlers = ''

Cache for Zend_Search_Lucene_Storage_File_Filesystem objects Array: filename => Zend_Search_Lucene_Storage_File object

Details

$_fileHandlers
array
visibility
protected
default
final
false
static
false
throws

Methods

__construct

__construct( string $path ) :

Object constructor Checks if $path is a directory or tries to create it.

Arguments
$path
string
Details
visibility
public
final
false
static
false
throws

close

close( ) : void

Closes the store.

Details
visibility
public
final
false
static
false

createFile

createFile( string $filename ) : Zend_Search_Lucene_Storage_File

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

Arguments
$filename
string
Details
visibility
public
final
false
static
false
throws

deleteFile

deleteFile( string $filename ) : void

Removes an existing $filename in the directory.

Arguments
$filename
string
Details
visibility
public
final
false
static
false
throws

fileExists

fileExists( string $filename ) : boolean

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

Arguments
$filename
string
Output
boolean
Details
visibility
public
final
false
static
false

fileLength

fileLength( string $filename ) : integer

Returns the length of a $filename in the directory.

Arguments
$filename
string
Output
integer
Details
visibility
public
final
false
static
false

fileList

fileList( ) : array

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

Output
array
Details
visibility
public
final
false
static
false

fileModified

fileModified( string $filename ) : integer

Returns the UNIX timestamp $filename was last modified.

Arguments
$filename
string
Output
integer
Details
visibility
public
final
false
static
false

getDefaultFilePermissions

getDefaultFilePermissions( ) : integer

Get default file permissions

Output
integer
Details
visibility
public
final
false
static
true

getFileObject

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

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).

Arguments
$filename
string
$shareHandler
boolean
Details
visibility
public
final
false
static
false

mkdirs

mkdirs( string $dir, integer $mode = 0777, boolean $recursive = true ) : boolean

Utility function to recursive directory creation

Arguments
$dir
string
$mode
integer
$recursive
boolean
Output
boolean
Details
visibility
public
final
false
static
true

purgeFile

purgeFile( string $filename ) : void

Purge file if it's cached by directory object

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

Arguments
$filename
string
Details
visibility
public
final
false
static
false

renameFile

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

Renames an existing file in the directory.

Arguments
$from
string
$to
string
Details
visibility
public
final
false
static
false
throws

setDefaultFilePermissions

setDefaultFilePermissions( integer $mode ) :

Set default file permissions

Arguments
$mode
integer
Details
visibility
public
final
false
static
true

touchFile

touchFile( string $filename ) : void

Sets the modified time of $filename to now.

Arguments
$filename
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.