add Support for passing a FileInfo instance to View->putFileInfo

remotes/origin/ldap_group_count
Robin Appelman 12 years ago
parent 82762bb462
commit e706cf6c06
  1. 4
      lib/private/files/fileinfo.php
  2. 5
      lib/private/files/view.php

@ -146,4 +146,8 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess, \JsonSerializable {
public function getType() {
return $this->data['type'];
}
public function getData(){
return $this->data;
}
}

@ -963,12 +963,15 @@ class View {
* change file metadata
*
* @param string $path
* @param array $data
* @param array | \OCP\Files\FileInfo $data
* @return int
*
* returns the fileid of the updated file
*/
public function putFileInfo($path, $data) {
if ($data instanceof FileInfo) {
$data = $data->getData();
}
$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
/**
* @var \OC\Files\Storage\Storage $storage

Loading…
Cancel
Save