Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
/**
* get the uncompressed size of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
abstract public function filesize($path);
/**
* get the last modified time of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
abstract public function mtime($path);
/**
* get the uncompressed size of a file in the archive
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function filesize($path) {
$stat = $this->getHeader($path);
- return $stat['size'];
+ return $stat['size'] ?? false;
}
/**
* get the last modified time of a file in the archive
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function mtime($path) {
$stat = $this->getHeader($path);
- return $stat['mtime'];
+ return $stat['mtime'] ?? false;
}
/**
/**
* get the uncompressed size of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
public function filesize($path) {
$stat = $this->zip->statName($path);
- return $stat['size'];
+ return $stat['size'] ?? false;
}
/**
* get the last modified time of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
public function mtime($path) {
return filemtime($this->path);