@@ -321,51 +321,9 @@ public function stat(string $path): array|false {
321321 return $ stat ;
322322 }
323323
324- /**
325- * Return content length for object
326- *
327- * When the information is already present (e.g. opendir has been called before)
328- * this value is return. Otherwise a headObject is emitted.
329- */
330- private function getContentLength (string $ path ): int {
331- if (isset ($ this ->filesCache [$ path ])) {
332- return (int )$ this ->filesCache [$ path ]['ContentLength ' ];
333- }
334-
335- $ result = $ this ->headObject ($ path );
336- if (isset ($ result ['ContentLength ' ])) {
337- return (int )$ result ['ContentLength ' ];
338- }
339-
340- return 0 ;
341- }
342-
343- /**
344- * Return last modified for object
345- *
346- * When the information is already present (e.g. opendir has been called before)
347- * this value is return. Otherwise a headObject is emitted.
348- */
349- private function getLastModified (string $ path ): string {
350- if (isset ($ this ->filesCache [$ path ])) {
351- return $ this ->filesCache [$ path ]['LastModified ' ];
352- }
353-
354- $ result = $ this ->headObject ($ path );
355- if (isset ($ result ['LastModified ' ])) {
356- return $ result ['LastModified ' ];
357- }
358-
359- return 'now ' ;
360- }
361-
362324 public function is_dir (string $ path ): bool {
363325 $ path = $ this ->normalizePath ($ path );
364326
365- if (isset ($ this ->filesCache [$ path ])) {
366- return false ;
367- }
368-
369327 try {
370328 return $ this ->doesDirectoryExist ($ path );
371329 } catch (S3Exception $ e ) {
@@ -388,7 +346,7 @@ public function filetype(string $path): string|false {
388346 if (isset ($ this ->directoryCache [$ path ]) && $ this ->directoryCache [$ path ]) {
389347 return 'dir ' ;
390348 }
391- if (isset ( $ this -> filesCache [ $ path ]) || $ this ->headObject ($ path )) {
349+ if ($ this ->headObject ($ path )) {
392350 return 'file ' ;
393351 }
394352 if ($ this ->doesDirectoryExist ($ path )) {
0 commit comments