aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/node/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/node/file.php')
-rw-r--r--lib/private/files/node/file.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/files/node/file.php b/lib/private/files/node/file.php
index 75d5e0166b6..81e251c20b8 100644
--- a/lib/private/files/node/file.php
+++ b/lib/private/files/node/file.php
@@ -16,7 +16,7 @@ class File extends Node implements \OCP\Files\File {
* @throws \OCP\Files\NotPermittedException
*/
public function getContent() {
- if ($this->checkPermissions(\OCP\PERMISSION_READ)) {
+ if ($this->checkPermissions(\OCP\Constants::PERMISSION_READ)) {
/**
* @var \OC\Files\Storage\Storage $storage;
*/
@@ -31,7 +31,7 @@ class File extends Node implements \OCP\Files\File {
* @throws \OCP\Files\NotPermittedException
*/
public function putContent($data) {
- if ($this->checkPermissions(\OCP\PERMISSION_UPDATE)) {
+ if ($this->checkPermissions(\OCP\Constants::PERMISSION_UPDATE)) {
$this->sendHooks(array('preWrite'));
$this->view->file_put_contents($this->path, $data);
$this->sendHooks(array('postWrite'));
@@ -55,7 +55,7 @@ class File extends Node implements \OCP\Files\File {
public function fopen($mode) {
$preHooks = array();
$postHooks = array();
- $requiredPermissions = \OCP\PERMISSION_READ;
+ $requiredPermissions = \OCP\Constants::PERMISSION_READ;
switch ($mode) {
case 'r+':
case 'rb+':
@@ -73,7 +73,7 @@ class File extends Node implements \OCP\Files\File {
case 'ab':
$preHooks[] = 'preWrite';
$postHooks[] = 'postWrite';
- $requiredPermissions |= \OCP\PERMISSION_UPDATE;
+ $requiredPermissions |= \OCP\Constants::PERMISSION_UPDATE;
break;
}
@@ -88,7 +88,7 @@ class File extends Node implements \OCP\Files\File {
}
public function delete() {
- if ($this->checkPermissions(\OCP\PERMISSION_DELETE)) {
+ if ($this->checkPermissions(\OCP\Constants::PERMISSION_DELETE)) {
$this->sendHooks(array('preDelete'));
$this->view->unlink($this->path);
$nonExisting = new NonExistingFile($this->root, $this->view, $this->path);