@@ -188,23 +188,12 @@ public function listContents(string $path, bool $deep): iterable
188
188
return $ this ->adapter ->listContents ($ path , $ deep );
189
189
}
190
190
191
- /**
192
- * Get metadata.
193
- *
194
- * @param string $path
195
- * @return array
196
- */
197
- private function getMetadata ($ path )
198
- {
199
- return $ this ->metadataProvider ->getMetadata ($ path );
200
- }
201
-
202
191
/**
203
192
* {@inheritdoc}
204
193
*/
205
194
public function fileSize (string $ path ): FileAttributes
206
195
{
207
- $ result = $ this ->getMetadata ($ path );
196
+ $ result = $ this ->metadataProvider -> getMetadata ($ path );
208
197
return new FileAttributes ($ path , (int )$ result ['size ' ]);
209
198
}
210
199
@@ -213,7 +202,7 @@ public function fileSize(string $path): FileAttributes
213
202
*/
214
203
public function mimeType (string $ path ): FileAttributes
215
204
{
216
- $ result = $ this ->getMetadata ($ path );
205
+ $ result = $ this ->metadataProvider -> getMetadata ($ path );
217
206
return new FileAttributes ($ path , null , null , null , $ result ['mimetype ' ]);
218
207
}
219
208
@@ -222,7 +211,7 @@ public function mimeType(string $path): FileAttributes
222
211
*/
223
212
public function lastModified (string $ path ): FileAttributes
224
213
{
225
- $ result = $ this ->getMetadata ($ path );
214
+ $ result = $ this ->metadataProvider -> getMetadata ($ path );
226
215
return new FileAttributes ($ path , null , null , (int )$ result ['timestamp ' ]);
227
216
}
228
217
@@ -231,7 +220,7 @@ public function lastModified(string $path): FileAttributes
231
220
*/
232
221
public function visibility (string $ path ): FileAttributes
233
222
{
234
- $ result = $ this ->getMetadata ($ path );
223
+ $ result = $ this ->metadataProvider -> getMetadata ($ path );
235
224
return new FileAttributes ($ path , null , $ result ['visibility ' ]);
236
225
}
237
226
}
0 commit comments