Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getstoragestats.php « ajax « files « apps - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 192c8ae2c700b0f8fd1399feacc2bd834395408f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

$dir = '/';

if (isset($_GET['dir'])) {
	$dir = (string)$_GET['dir'];
}

OCP\JSON::checkLoggedIn();
\OC::$server->getSession()->close();

// send back json
try {
	OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir)));
} catch (\OCP\Files\NotFoundException $e) {
	OCP\JSON::error(['data' => ['message' => 'Folder not found']]);
}