2013-01-11 19:47:28 +04:00
|
|
|
<?php
|
|
|
|
|
2013-11-06 13:55:19 +04:00
|
|
|
$dir = '/';
|
|
|
|
|
|
|
|
if (isset($_GET['dir'])) {
|
|
|
|
$dir = $_GET['dir'];
|
|
|
|
}
|
|
|
|
|
2013-01-11 19:47:28 +04:00
|
|
|
OCP\JSON::checkLoggedIn();
|
2014-07-16 21:40:22 +04:00
|
|
|
\OC::$server->getSession()->close();
|
2013-01-11 19:47:28 +04:00
|
|
|
|
|
|
|
// send back json
|
2015-01-06 17:56:06 +03:00
|
|
|
try {
|
|
|
|
OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir)));
|
|
|
|
} catch (\OCP\Files\NotFoundException $e) {
|
|
|
|
OCP\JSON::error(['data' => ['message' => 'Folder not found']]);
|
|
|
|
}
|