$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));
}
/**
+ * get an item from the legacy cache
+ *
* @param string|int $path
* @return array
*/
}
/**
+ * get all child items of an item from the legacy cache
+ *
* @param int $id
* @return array
*/
* 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
*/
/**
* 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) {
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
}
}
+ /**
+ * preform a delete update
+ *
+ * @param string $path the relative path of the file
+ */
static public function deleteUpdate($path) {
/**
* @var \OC\Files\Storage\Storage $storage
}
}
+ /**
+ * 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
}
/**
- * 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()) {
}
/**
+ * 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);
}
/**
+ * insert data into the new cache
+ *
* @param array $data the data for the new cache
*/
function insert($data) {
}
/**
+ * check if an item is already in the new cache
+ *
* @param string $storage
* @param string $pathHash
* @param string $id
}
/**
+ * get the numeric id for a mimetype
+ *
* @param string $mimetype
* @param \OC\Files\Storage\Storage $storage
* @return int