nextcloud/apps/files/ajax/getstoragestats.php

17 lines
302 B
PHP

<?php
// only need filesystem apps
$RUNTIME_APPTYPES = array('filesystem');
$dir = '/';
if (isset($_GET['dir'])) {
$dir = $_GET['dir'];
}
OCP\JSON::checkLoggedIn();
\OC::$session->close();
// send back json
OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir)));