|
@@ 1329-1331 (lines=3) @@
|
| 1326 |
|
public function tree($hash='', $deep=0, $exclude='') { |
| 1327 |
|
$path = $hash ? $this->decode($hash) : $this->root; |
| 1328 |
|
|
| 1329 |
|
if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') { |
| 1330 |
|
return false; |
| 1331 |
|
} |
| 1332 |
|
|
| 1333 |
|
$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null); |
| 1334 |
|
array_unshift($dirs, $dir); |
|
@@ 1409-1412 (lines=4) @@
|
| 1406 |
|
* @author Dmitry (dio) Levashov |
| 1407 |
|
**/ |
| 1408 |
|
public function open($hash) { |
| 1409 |
|
if (($file = $this->file($hash)) == false |
| 1410 |
|
|| $file['mime'] == 'directory') { |
| 1411 |
|
return false; |
| 1412 |
|
} |
| 1413 |
|
|
| 1414 |
|
return $this->fopenCE($this->decode($hash), 'rb'); |
| 1415 |
|
} |