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 */ $stream = false) |
||
93 | |||
94 | /** |
||
95 | * {@inheritDoc} |
||
96 | */ |
||
97 | public function put( |
||
115 | |||
116 | /** |
||
117 | * {@inheritDoc} |
||
118 | */ |
||
119 | public function del(/*# string */ $path)/*# : bool */ |
||
126 | |||
127 | /** |
||
128 | * {@inheritDoc} |
||
129 | */ |
||
130 | public function meta(/*# string */ $path)/*# : array */ |
||
137 | |||
138 | /** |
||
139 | * {@inheritDoc} |
||
140 | */ |
||
141 | public function copy( |
||
151 | |||
152 | /** |
||
153 | * {@inheritDoc} |
||
154 | */ |
||
155 | public function move( |
||
166 | |||
167 | /** |
||
168 | * Copy or rename |
||
169 | * |
||
170 | * @param string $from |
||
171 | * @param string $to |
||
172 | * @param string $action 'copy' or 'rename' |
||
173 | * @return bool |
||
174 | * @access protected |
||
175 | */ |
||
176 | protected function sameFilesystemAction( |
||
186 | |||
187 | /** |
||
188 | * Copy between different filesystem |
||
189 | * |
||
190 | * @param string $from |
||
191 | * @param string $to |
||
192 | * @return bool |
||
193 | * @access protected |
||
194 | */ |
||
195 | protected function diffFilesystemCopy( |
||
217 | |||
218 | /** |
||
219 | * Exists on same filesystem ? |
||
220 | * |
||
221 | * @param string $path1 |
||
222 | * @param string $path2 |
||
223 | * @return bool |
||
224 | * @access protected |
||
225 | */ |
||
226 | protected function isSameFilesystem( |
||
232 | |||
233 | /** |
||
234 | * Copy an array of paths to destination |
||
235 | * |
||
236 | * @param array $paths |
||
237 | * @param string $destination |
||
238 | * @access protected |
||
239 | */ |
||
240 | protected function copyDir(array $paths, /*# string */ $destination) |
||
255 | |||
256 | /** |
||
257 | * Prepend mount point prefix to the array of paths |
||
258 | * |
||
259 | * @param array $paths |
||
260 | * @param string $mountPoint |
||
261 | * @return array |
||
262 | * @access protected |
||
263 | */ |
||
264 | protected function prependMountPoint( |
||
274 | } |
||
275 |