equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Search_Lucene |
16 * @package Zend_Search_Lucene |
17 * @subpackage Storage |
17 * @subpackage Storage |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Filesystem.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Filesystem.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 |
23 |
24 /** Zend_Search_Lucene_Storage_Directory */ |
24 /** Zend_Search_Lucene_Storage_Directory */ |
25 require_once 'Zend/Search/Lucene/Storage/Directory.php'; |
25 require_once 'Zend/Search/Lucene/Storage/Directory.php'; |
29 * FileSystem implementation of Directory abstraction. |
29 * FileSystem implementation of Directory abstraction. |
30 * |
30 * |
31 * @category Zend |
31 * @category Zend |
32 * @package Zend_Search_Lucene |
32 * @package Zend_Search_Lucene |
33 * @subpackage Storage |
33 * @subpackage Storage |
34 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
34 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
36 */ |
36 */ |
37 class Zend_Search_Lucene_Storage_Directory_Filesystem extends Zend_Search_Lucene_Storage_Directory |
37 class Zend_Search_Lucene_Storage_Directory_Filesystem extends Zend_Search_Lucene_Storage_Directory |
38 { |
38 { |
39 /** |
39 /** |
204 $this->_fileHandlers[$filename]->close(); |
204 $this->_fileHandlers[$filename]->close(); |
205 } |
205 } |
206 unset($this->_fileHandlers[$filename]); |
206 unset($this->_fileHandlers[$filename]); |
207 |
207 |
208 global $php_errormsg; |
208 global $php_errormsg; |
209 $trackErrors = ini_get('track_errors'); ini_set('track_errors', '1'); |
209 $trackErrors = ini_get('track_errors'); |
|
210 ini_set('track_errors', '1'); |
210 if (!@unlink($this->_dirPath . '/' . $filename)) { |
211 if (!@unlink($this->_dirPath . '/' . $filename)) { |
211 ini_set('track_errors', $trackErrors); |
212 ini_set('track_errors', $trackErrors); |
212 require_once 'Zend/Search/Lucene/Exception.php'; |
213 require_once 'Zend/Search/Lucene/Exception.php'; |
213 throw new Zend_Search_Lucene_Exception('Can\'t delete file: ' . $php_errormsg); |
214 throw new Zend_Search_Lucene_Exception('Can\'t delete file: ' . $php_errormsg); |
214 } |
215 } |