|
@@ 1271-1273 (lines=3) @@
|
| 1268 |
|
public function tree($hash='', $deep=0, $exclude='') { |
| 1269 |
|
$path = $hash ? $this->decode($hash) : $this->root; |
| 1270 |
|
|
| 1271 |
|
if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') { |
| 1272 |
|
return false; |
| 1273 |
|
} |
| 1274 |
|
|
| 1275 |
|
$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null); |
| 1276 |
|
array_unshift($dirs, $dir); |
|
@@ 1351-1354 (lines=4) @@
|
| 1348 |
|
* @author Dmitry (dio) Levashov |
| 1349 |
|
**/ |
| 1350 |
|
public function open($hash) { |
| 1351 |
|
if (($file = $this->file($hash)) == false |
| 1352 |
|
|| $file['mime'] == 'directory') { |
| 1353 |
|
return false; |
| 1354 |
|
} |
| 1355 |
|
|
| 1356 |
|
return $this->fopenCE($this->decode($hash), 'rb'); |
| 1357 |
|
} |