mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
refactor(files_external/S3): drop unused methods
getContentLength() and getLastModified() are dead code. Originally added in PR #11518 and made defunct in PR #29220. Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
ee43b68606
commit
08b465d219
1 changed files with 0 additions and 38 deletions
|
|
@ -321,44 +321,6 @@ class AmazonS3 extends Common {
|
|||
return $stat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return content length for object
|
||||
*
|
||||
* When the information is already present (e.g. opendir has been called before)
|
||||
* this value is return. Otherwise a headObject is emitted.
|
||||
*/
|
||||
private function getContentLength(string $path): int {
|
||||
if (isset($this->filesCache[$path])) {
|
||||
return (int)$this->filesCache[$path]['ContentLength'];
|
||||
}
|
||||
|
||||
$result = $this->headObject($path);
|
||||
if (isset($result['ContentLength'])) {
|
||||
return (int)$result['ContentLength'];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return last modified for object
|
||||
*
|
||||
* When the information is already present (e.g. opendir has been called before)
|
||||
* this value is return. Otherwise a headObject is emitted.
|
||||
*/
|
||||
private function getLastModified(string $path): string {
|
||||
if (isset($this->filesCache[$path])) {
|
||||
return $this->filesCache[$path]['LastModified'];
|
||||
}
|
||||
|
||||
$result = $this->headObject($path);
|
||||
if (isset($result['LastModified'])) {
|
||||
return $result['LastModified'];
|
||||
}
|
||||
|
||||
return 'now';
|
||||
}
|
||||
|
||||
public function is_dir(string $path): bool {
|
||||
$path = $this->normalizePath($path);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue