1 | <?php |
||
39 | class Storage extends ObjectAbstract implements StorageInterface, ErrorAwareInterface, ExtensionAwareInterface |
||
40 | { |
||
41 | use PathAwareTrait, ErrorAwareTrait, ExtensionAwareTrait; |
||
42 | |||
43 | /** |
||
44 | * At least have one filesystem mounted |
||
45 | * |
||
46 | * @param string $mountPoint |
||
47 | * @param FilesystemInterface $filesystem |
||
48 | * @access public |
||
49 | */ |
||
50 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | public function has(/*# string */ $path)/*# : bool */ |
||
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | public function get(/*# string */ $path, /*# bool */ $getAsStream = false) |
||
94 | |||
95 | /** |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | public function put( |
||
116 | |||
117 | /** |
||
118 | * {@inheritDoc} |
||
119 | */ |
||
120 | public function del(/*# string */ $path)/*# : bool */ |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | */ |
||
131 | public function meta(/*# string */ $path)/*# : array */ |
||
138 | |||
139 | /** |
||
140 | * {@inheritDoc} |
||
141 | */ |
||
142 | public function copy( |
||
152 | |||
153 | /** |
||
154 | * {@inheritDoc} |
||
155 | */ |
||
156 | public function move( |
||
167 | |||
168 | /** |
||
169 | * Copy or rename |
||
170 | * |
||
171 | * @param string $from |
||
172 | * @param string $to |
||
173 | * @param string $action 'copy' or 'rename' |
||
174 | * @return bool |
||
175 | * @access protected |
||
176 | */ |
||
177 | protected function sameFilesystemAction( |
||
187 | |||
188 | /** |
||
189 | * Copy between different filesystem |
||
190 | * |
||
191 | * @param string $from |
||
192 | * @param string $to |
||
193 | * @return bool |
||
194 | * @access protected |
||
195 | */ |
||
196 | protected function diffFilesystemCopy( |
||
213 | |||
214 | /** |
||
215 | * Exists on same filesystem ? |
||
216 | * |
||
217 | * @param string $path1 |
||
218 | * @param string $path2 |
||
219 | * @return bool |
||
220 | * @access protected |
||
221 | */ |
||
222 | protected function isSameFilesystem( |
||
228 | |||
229 | /** |
||
230 | * Copy an array of paths to destination |
||
231 | * |
||
232 | * @param array $paths |
||
233 | * @param string $destination |
||
234 | * @access protected |
||
235 | */ |
||
236 | protected function copyDir(array $paths, /*# string */ $destination) |
||
246 | |||
247 | /** |
||
248 | * Prepend mount point prefix to the array of paths |
||
249 | * |
||
250 | * @param array $paths |
||
251 | * @param string $mountPoint |
||
252 | * @return array |
||
253 | * @access protected |
||
254 | */ |
||
255 | protected function prependMountPoint( |
||
265 | } |
||
266 |