@@ 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} |
|
@@ 155-167 (lines=13) @@ | ||
152 | /** |
|
153 | * {@inheritDoc} |
|
154 | */ |
|
155 | public function setMeta(array $meta)/*# : bool */ |
|
156 | { |
|
157 | if (!$this->exists()) { |
|
158 | return false; |
|
159 | } |
|
160 | ||
161 | if (!empty($meta)) { |
|
162 | $res = $this->getDriver()->setMeta($this->path, $meta); |
|
163 | $this->resetError(); |
|
164 | return $res; |
|
165 | } |
|
166 | return true; |
|
167 | } |
|
168 | ||
169 | /** |
|
170 | * {@inheritDoc} |
|
@@ 199-211 (lines=13) @@ | ||
196 | /** |
|
197 | * {@inheritDoc} |
|
198 | */ |
|
199 | public function delete()/*# : bool */ |
|
200 | { |
|
201 | if ($this->exists()) { |
|
202 | if (!$this->isFilesystemDeletable()) { |
|
203 | return false; |
|
204 | } |
|
205 | ||
206 | $res = $this->getDriver()->delete($this->path); |
|
207 | $this->resetError(); |
|
208 | return $res; |
|
209 | } |
|
210 | return true; |
|
211 | } |
|
212 | ||
213 | /** |
|
214 | * Reset error to driver's error |