* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC\Files\Node;
use OC\Files\Utils\PathHelper;
* @inheritDoc
*/
public function getMimetype() {
+ if (isset($this->data['mimetype'])) {
+ return $this->data['mimetype'];
+ }
return $this->__call(__FUNCTION__, func_get_args());
}
* @inheritDoc
*/
public function getMimePart() {
+ if (isset($this->data['mimetype'])) {
+ [$part,] = explode('/', $this->data['mimetype']);
+ return $part;
+ }
return $this->__call(__FUNCTION__, func_get_args());
}
* @inheritDoc
*/
public function getType() {
+ if (isset($this->data['type'])) {
+ return $this->data['type'];
+ }
return $this->__call(__FUNCTION__, func_get_args());
}
namespace OC\Files\Node;
+use OCP\Files\FileInfo;
use OCP\Constants;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
}, [
'path' => $this->path,
'permissions' => Constants::PERMISSION_ALL,
+ 'type' => FileInfo::TYPE_FOLDER,
+ 'mimetype' => FileInfo::MIMETYPE_FOLDER,
]);
}