API Documentation

Zend/Search/Lucene/Storage/File/Filesystem.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Storage  
Version
$Id: Filesystem.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Search_Lucene_Storage_File_Filesystem

Package: Zend\Search\Lucene\Storage

Parent(s)
\Zend_Search_Lucene_Storage_File
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedresource  $_fileHandle= ''

Resource of the open file

Details
Type
resource

Methods

methodpublic__construct( string $filename, string $mode = 'r+b' ) : void

Class constructor. Open the file.

Parameters
Name Type Description
$filename string
$mode string
methodprotected_fread( integer $length = 1 ) : string

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

Parameters
Name Type Description
$length integer
Returns
Type Description
string
methodprotected_fwrite( string $data, integer $length = null ) : void

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

Parameters
Name Type Description
$data string
$length integer
methodpublicclose( ) : void

Close File object

methodpublicflush( ) : boolean

Flush output.

Returns true on success or false on failure.

Returns
Type Description
boolean
methodpubliclock( integer $lockType, boolean $nonBlockingLock = false ) : boolean

Lock file

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

Parameters
Name Type Description
$lockType integer
$nonBlockingLock boolean
Returns
Type Description
boolean
methodpublicseek( integer $offset, integer $whence = SEEK_SET ) : integer

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
Name Type Description
$offset integer
$whence integer
Returns
Type Description
integer
methodpublicsize( ) : integer

Get the size of the already opened file

Returns
Type Description
integer
methodpublictell( ) : integer

Get file position.

Returns
Type Description
integer
methodpublicunlock( ) : boolean

Unlock file

Returns true on success

Returns
Type Description
boolean
Documentation was generated by DocBlox 0.15.1.