@@ 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} |
|
@@ 203-215 (lines=13) @@ | ||
200 | /** |
|
201 | * {@inheritDoc} |
|
202 | */ |
|
203 | public function delete()/*# : bool */ |
|
204 | { |
|
205 | if ($this->exists()) { |
|
206 | if (!$this->isFilesystemDeletable()) { |
|
207 | return false; |
|
208 | } |
|
209 | ||
210 | $res = $this->getDriver()->delete($this->path); |
|
211 | $this->resetError(); |
|
212 | return $res; |
|
213 | } |
|
214 | return true; |
|
215 | } |
|
216 | ||
217 | /** |
|
218 | * Reset error to driver's error |