|
@@ 1295-1297 (lines=3) @@
|
| 1292 |
|
public function tree($hash='', $deep=0, $exclude='') { |
| 1293 |
|
$path = $hash ? $this->decode($hash) : $this->root; |
| 1294 |
|
|
| 1295 |
|
if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') { |
| 1296 |
|
return false; |
| 1297 |
|
} |
| 1298 |
|
|
| 1299 |
|
$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null); |
| 1300 |
|
array_unshift($dirs, $dir); |
|
@@ 1375-1378 (lines=4) @@
|
| 1372 |
|
* @author Dmitry (dio) Levashov |
| 1373 |
|
**/ |
| 1374 |
|
public function open($hash) { |
| 1375 |
|
if (($file = $this->file($hash)) == false |
| 1376 |
|
|| $file['mime'] == 'directory') { |
| 1377 |
|
return false; |
| 1378 |
|
} |
| 1379 |
|
|
| 1380 |
|
return $this->fopenCE($this->decode($hash), 'rb'); |
| 1381 |
|
} |