Expose creatable permissions trough fileinfo

This commit is contained in:
Robin Appelman 2014-09-24 17:49:52 +02:00
parent f46e49529f
commit ccb4475a8d
2 changed files with 16 additions and 0 deletions

View file

@ -183,6 +183,15 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
return $this->checkPermissions(\OCP\PERMISSION_UPDATE); return $this->checkPermissions(\OCP\PERMISSION_UPDATE);
} }
/**
* Check whether new files or folders can be created inside this folder
*
* @return bool
*/
public function isCreatable() {
return $this->checkPermissions(\OCP\PERMISSION_CREATE);
}
/** /**
* @return bool * @return bool
*/ */

View file

@ -135,6 +135,13 @@ interface FileInfo {
*/ */
public function isUpdateable(); public function isUpdateable();
/**
* Check whether new files or folders can be created inside this folder
*
* @return bool
*/
public function isCreatable();
/** /**
* Check if a file or folder can be deleted * Check if a file or folder can be deleted
* *