|
@@ 1096-1098 (lines=3) @@
|
| 1093 |
|
public function tree($hash='', $deep=0, $exclude='') { |
| 1094 |
|
$path = $hash ? $this->decode($hash) : $this->root; |
| 1095 |
|
|
| 1096 |
|
if (($dir = $this->stat($path)) == false || $dir['mime'] != 'directory') { |
| 1097 |
|
return false; |
| 1098 |
|
} |
| 1099 |
|
|
| 1100 |
|
$dirs = $this->gettree($path, $deep > 0 ? $deep -1 : $this->treeDeep-1, $exclude ? $this->decode($exclude) : null); |
| 1101 |
|
array_unshift($dirs, $dir); |
|
@@ 1176-1179 (lines=4) @@
|
| 1173 |
|
* @author Dmitry (dio) Levashov |
| 1174 |
|
**/ |
| 1175 |
|
public function open($hash) { |
| 1176 |
|
if (($file = $this->file($hash)) == false |
| 1177 |
|
|| $file['mime'] == 'directory') { |
| 1178 |
|
return false; |
| 1179 |
|
} |
| 1180 |
|
|
| 1181 |
|
return $this->_fopen($this->decode($hash), 'rb'); |
| 1182 |
|
} |