1 | <?php |
||
39 | class Storage extends ObjectAbstract implements StorageInterface, ErrorAwareInterface, ExtensionAwareInterface |
||
40 | { |
||
41 | use PathAwareTrait, ErrorAwareTrait, ExtensionAwareTrait; |
||
42 | |||
43 | /** |
||
44 | * @param string $mountPoint |
||
45 | * @param FilesystemInterface $filesystem |
||
46 | * @access public |
||
47 | */ |
||
48 | public function __construct( |
||
54 | |||
55 | /** |
||
56 | * {@inheritDoc} |
||
57 | */ |
||
58 | public function has(/*# string */ $path)/*# : bool */ |
||
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | public function get(/*# string */ $path, /*# bool */ $stream = false) |
||
91 | |||
92 | /** |
||
93 | * {@inheritDoc} |
||
94 | */ |
||
95 | public function put( |
||
113 | |||
114 | /** |
||
115 | * {@inheritDoc} |
||
116 | */ |
||
117 | public function meta(/*# string */ $path)/*# : array */ |
||
124 | |||
125 | /** |
||
126 | * {@inheritDoc} |
||
127 | */ |
||
128 | public function copy( |
||
138 | |||
139 | /** |
||
140 | * {@inheritDoc} |
||
141 | */ |
||
142 | public function move( |
||
153 | |||
154 | /** |
||
155 | * {@inheritDoc} |
||
156 | */ |
||
157 | public function delete(/*# string */ $path)/*# : bool */ |
||
164 | |||
165 | /** |
||
166 | * {@inheritDoc} |
||
167 | */ |
||
168 | public function isDir(/*# string */ $path)/*# : bool */ |
||
172 | |||
173 | /** |
||
174 | * Copy or rename |
||
175 | * |
||
176 | * @param string $from |
||
177 | * @param string $to |
||
178 | * @param string $action 'copy' or 'rename' |
||
179 | * @return bool |
||
180 | * @access protected |
||
181 | */ |
||
182 | protected function sameFilesystemAction( |
||
192 | |||
193 | /** |
||
194 | * Copy between different filesystem |
||
195 | * |
||
196 | * @param string $from |
||
197 | * @param string $to |
||
198 | * @return bool |
||
199 | * @access protected |
||
200 | */ |
||
201 | protected function diffFilesystemCopy( |
||
221 | |||
222 | /** |
||
223 | * Exists on same filesystem ? |
||
224 | * |
||
225 | * @param string $path1 |
||
226 | * @param string $path2 |
||
227 | * @return bool |
||
228 | * @access protected |
||
229 | */ |
||
230 | protected function isSameFilesystem( |
||
236 | |||
237 | /** |
||
238 | * Copy an array of paths to destination |
||
239 | * |
||
240 | * @param array $paths |
||
241 | * @param string $destination |
||
242 | * @access protected |
||
243 | */ |
||
244 | protected function copyDir(array $paths, /*# string */ $destination) |
||
254 | |||
255 | /** |
||
256 | * Prepend mount point prefix to the array of paths |
||
257 | * |
||
258 | * @param array $paths |
||
259 | * @param string $mountPoint |
||
260 | * @return array |
||
261 | * @access protected |
||
262 | */ |
||
263 | protected function prependMountPoint( |
||
273 | } |
||
274 |