return $this->metaData[$path];
} else {
if ($list) {
- $response = $this->dropbox->getMetaData($path);
+ try {
+ $response = $this->dropbox->getMetaData($path);
+ } catch (Exception $exception) {
+ return false;
+ }
if ($response && isset($response['contents'])) {
$contents = $response['contents'];
// Cache folder's contents
if ($metaData = $this->getMetaData($path)) {
$stat['size'] = $metaData['bytes'];
$stat['atime'] = time();
- $stat['mtime'] = strtotime($metaData['modified']);
+ $stat['mtime'] = (isset($metaData['modified'])) ? strtotime($metaData['modified']) : time();
$stat['ctime'] = $stat['mtime'];
return $stat;
}
}
public function is_readable($path) {
- return true;
+ return self::file_exists($path);
}
public function is_writable($path) {
- return true;
+ return self::file_exists($path);
}
public function file_exists($path) {