Skip to content
Snippets Groups Projects
Commit 0e55b611 authored by Robin Appelman's avatar Robin Appelman
Browse files

Improve phpdoc for the filecache

parent 24d471af
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,11 @@ class Legacy {
$this->user = $user;
}
/**
* get the numbers of items in the legacy cache
*
* @return int
*/
function getCount() {
$query = \OC_DB::prepare('SELECT COUNT(`id`) AS `count` FROM `*PREFIX*fscache` WHERE `user` = ?');
$result = $query->execute(array($this->user));
......@@ -62,6 +67,8 @@ class Legacy {
}
/**
* get an item from the legacy cache
*
* @param string|int $path
* @return array
*/
......@@ -76,6 +83,8 @@ class Legacy {
}
/**
* get all child items of an item from the legacy cache
*
* @param int $id
* @return array
*/
......
......@@ -91,7 +91,7 @@ class Scanner {
* scan all the files in a folder and store them in the cache
*
* @param string $path
* @param SCAN_RECURSIVE/SCAN_SHALLOW $recursive
* @param bool $recursive
* @param bool $onlyChilds
* @return int the size of the scanned folder or -1 if the size is unknown at this stage
*/
......
......@@ -16,7 +16,7 @@ class Updater {
/**
* resolve a path to a storage and internal path
*
* @param string $path
* @param string $path the relative path
* @return array consisting of the storage and the internal path
*/
static public function resolvePath($path) {
......@@ -24,6 +24,11 @@ class Updater {
return $view->resolvePath($path);
}
/**
* preform a write update
*
* @param string $path the relative path of the file
*/
static public function writeUpdate($path) {
/**
* @var \OC\Files\Storage\Storage $storage
......@@ -39,6 +44,11 @@ class Updater {
}
}
/**
* preform a delete update
*
* @param string $path the relative path of the file
*/
static public function deleteUpdate($path) {
/**
* @var \OC\Files\Storage\Storage $storage
......@@ -53,6 +63,12 @@ class Updater {
}
}
/**
* preform a rename update
*
* @param string $from the relative path of the source file
* @param string $to the relative path of the target file
*/
static public function renameUpdate($from, $to) {
/**
* @var \OC\Files\Storage\Storage $storageFrom
......
......@@ -26,10 +26,10 @@ class Upgrade {
}
/**
* Preform a shallow upgrade
* Preform a upgrade a path and it's childs
*
* @param string $path
* @param int $mode
* @param bool $mode
*/
function upgradePath($path, $mode = Scanner::SCAN_RECURSIVE) {
if (!$this->legacy->hasItems()) {
......@@ -47,7 +47,10 @@ class Upgrade {
}
/**
* upgrade all child elements of an item
*
* @param int $id
* @param bool $mode
*/
function upgradeChilds($id, $mode = Scanner::SCAN_RECURSIVE) {
$children = $this->legacy->getChildren($id);
......@@ -64,6 +67,8 @@ class Upgrade {
}
/**
* insert data into the new cache
*
* @param array $data the data for the new cache
*/
function insert($data) {
......@@ -79,6 +84,8 @@ class Upgrade {
}
/**
* check if an item is already in the new cache
*
* @param string $storage
* @param string $pathHash
* @param string $id
......@@ -135,6 +142,8 @@ class Upgrade {
}
/**
* get the numeric id for a mimetype
*
* @param string $mimetype
* @param \OC\Files\Storage\Storage $storage
* @return int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment