@@ 109-119 (lines=11) @@ | ||
106 | /** |
|
107 | * {@inheritDoc} |
|
108 | */ |
|
109 | public function getContent(/*# bool */ $stream = false) |
|
110 | { |
|
111 | // not exists or filesystem not readable |
|
112 | if (!$this->exists() || !$this->isFilesystemReadable()) { |
|
113 | return null; |
|
114 | } |
|
115 | ||
116 | $res = $this->getFilesystem()->getDriver()->getContent($this->path, $stream); |
|
117 | $this->copyError($this->getFilesystem()->getDriver()); |
|
118 | return $res; |
|
119 | } |
|
120 | ||
121 | /** |
|
122 | * {@inheritDoc} |
|
@@ 146-155 (lines=10) @@ | ||
143 | /** |
|
144 | * {@inheritDoc} |
|
145 | */ |
|
146 | public function setContent($content)/*# : bool */ |
|
147 | { |
|
148 | if ($this->isFilesystemWritable()) { |
|
149 | $res = $this->getFilesystem()->getDriver() |
|
150 | ->setContent($this->path, $content); |
|
151 | $this->copyError($this->getFilesystem()->getDriver()); |
|
152 | return $res; |
|
153 | } |
|
154 | return false; |
|
155 | } |
|
156 | ||
157 | /** |
|
158 | * {@inheritDoc} |
|
@@ 215-226 (lines=12) @@ | ||
212 | * @return bool |
|
213 | * @access protected |
|
214 | */ |
|
215 | protected function action( |
|
216 | /*# string */ $destination, |
|
217 | /*# string */ $action |
|
218 | )/*# : bool */ { |
|
219 | if (!$this->exists() || !$this->isFilesystemWritable()) { |
|
220 | return false; |
|
221 | } |
|
222 | ||
223 | $res = $this->getFilesystem()->getDriver()->{$action}($this->path, $destination); |
|
224 | $this->copyError($this->getFilesystem()->getDriver()); |
|
225 | return (bool) $res; |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * Check filesystem readable or not |