summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/filecache.php9
-rw-r--r--lib/filestorage/local.php2
-rw-r--r--lib/filesystemview.php6
3 files changed, 13 insertions, 4 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 2f4a6daf216..7764890ef1a 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -23,9 +23,14 @@
* provide caching for filesystem info in the database
*
* not used by OC_Filesystem for reading filesystem info,
- * instread apps should use OC_FileCache::get where possible
+ * instead apps should use OC_FileCache::get where possible
+ *
+ * It will try to keep the data up to date but changes from outside
+ * ownCloud can invalidate the cache
+ *
+ * Methods that take $path and $root params expect $path to be relative, like
+ * /admin/files/file.txt, if $root is false
*
- * It will try to keep the data up to date but changes from outside ownCloud can invalidate the cache
*/
class OC_FileCache{
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 910b3fa039d..4a4019a3224 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -92,7 +92,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
public function file_get_contents($path) {
return file_get_contents($this->datadir.$path);
}
- public function file_put_contents($path, $data) {
+ public function file_put_contents($path, $data) {//trigger_error("$path = ".var_export($path, 1));
return file_put_contents($this->datadir.$path, $data);
}
public function unlink($path) {
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index ea9cbecee0e..1fc8e83d68f 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -36,8 +36,12 @@
*
* Filesystem functions are not called directly; they are passed to the correct
* OC_Filestorage object
+ *
+ * @note default root (if $root is empty or '/') is /data/[user]/
+ * @note If you don't include a leading slash, you may encounter problems.
+ * e.g. use $v = new \OC_FilesystemView( '/' . $params['uid'] ); not
+ * $v = new \OC_FilesystemView( $params['uid'] );
*/
-
class OC_FilesystemView {
private $fakeRoot='';
private $internal_path_cache=array();