2013-01-11 15:47:28 +00:00
|
|
|
<?php
|
2015-02-26 10:37:37 +00:00
|
|
|
|
2013-11-06 09:55:19 +00:00
|
|
|
$dir = '/';
|
|
|
|
|
|
|
|
if (isset($_GET['dir'])) {
|
2015-02-13 12:33:20 +00:00
|
|
|
$dir = (string)$_GET['dir'];
|
2013-11-06 09:55:19 +00:00
|
|
|
}
|
|
|
|
|
2013-01-11 15:47:28 +00:00
|
|
|
OCP\JSON::checkLoggedIn();
|
2014-07-16 17:40:22 +00:00
|
|
|
\OC::$server->getSession()->close();
|
2013-01-11 15:47:28 +00:00
|
|
|
|
|
|
|
// send back json
|
2015-01-06 14:56:06 +00: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']]);
|
|
|
|
}
|