Add option to set file modes

This commit is contained in:
Robin Appelman 2014-08-03 14:28:20 +02:00
commit 3888ae6b43
9 changed files with 235 additions and 89 deletions

View file

@ -65,7 +65,7 @@ class NativeFileInfo implements IFileInfo {
*/
protected function stat() {
if (!$this->statCache) {
$this->statCache = $this->share->stat($this->getPath());
$this->statCache = $this->share->getStat($this->getPath());
}
return $this->statCache;
}
@ -119,4 +119,20 @@ class NativeFileInfo implements IFileInfo {
$mode = $this->getMode();
return (bool)($mode & FileInfo::MODE_HIDDEN);
}
/**
* @return bool
*/
public function isSystem() {
$mode = $this->getMode();
return (bool)($mode & FileInfo::MODE_SYSTEM);
}
/**
* @return bool
*/
public function isArchived() {
$mode = $this->getMode();
return (bool)($mode & FileInfo::MODE_ARCHIVE);
}
}