| @@ 97-107 (lines=11) @@ | ||
| 94 | /** |
|
| 95 | * {@inheritDoc} |
|
| 96 | */ |
|
| 97 | public function getContent(/*# bool */ $stream = false) |
|
| 98 | { |
|
| 99 | // not exists or filesystem not readable |
|
| 100 | if (!$this->exists() || !$this->isFilesystemReadable()) { |
|
| 101 | return null; |
|
| 102 | } |
|
| 103 | ||
| 104 | $res = $this->getDriver()->getContent($this->path, $stream); |
|
| 105 | $this->resetError(); |
|
| 106 | return $res; |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * {@inheritDoc} |
|
| @@ 157-169 (lines=13) @@ | ||
| 154 | /** |
|
| 155 | * {@inheritDoc} |
|
| 156 | */ |
|
| 157 | public function setMeta(array $meta)/*# : bool */ |
|
| 158 | { |
|
| 159 | if (!$this->exists()) { |
|
| 160 | return false; |
|
| 161 | } |
|
| 162 | ||
| 163 | if (!empty($meta)) { |
|
| 164 | $res = $this->getDriver()->setMeta($this->path, $meta); |
|
| 165 | $this->resetError(); |
|
| 166 | return $res; |
|
| 167 | } |
|
| 168 | return true; |
|
| 169 | } |
|
| 170 | ||
| 171 | /** |
|
| 172 | * {@inheritDoc} |
|
| @@ 202-214 (lines=13) @@ | ||
| 199 | /** |
|
| 200 | * {@inheritDoc} |
|
| 201 | */ |
|
| 202 | public function delete()/*# : bool */ |
|
| 203 | { |
|
| 204 | if ($this->exists()) { |
|
| 205 | if (!$this->isFilesystemDeletable()) { |
|
| 206 | return false; |
|
| 207 | } |
|
| 208 | ||
| 209 | $res = $this->getDriver()->delete($this->path); |
|
| 210 | $this->resetError(); |
|
| 211 | return $res; |
|
| 212 | } |
|
| 213 | return true; |
|
| 214 | } |
|
| 215 | ||
| 216 | /** |
|
| 217 | * Reset error to driver's error |
|