summaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index d32e082ade9..09732e67ac6 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -23,6 +23,7 @@
* post_rename(oldpath,newpath)
* copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emitted in that order)
* post_rename(oldpath,newpath)
+ * post_initMountPoints(user, user_dir)
*
* the &run parameter can be set to false to prevent the operation from occurring
*/
@@ -30,6 +31,7 @@
namespace OC\Files;
const FREE_SPACE_UNKNOWN = -2;
+const FREE_SPACE_UNLIMITED = -3;
class Filesystem {
public static $loaded = false;
@@ -279,12 +281,15 @@ class Filesystem {
}
}
}
+
+ // Chance to mount for other storages
+ \OC_Hook::emit('OC_Filesystem', 'post_initMountPoints', array('user' => $user, 'user_dir' => $root));
}
/**
- * fill in the correct values for $user, and $password placeholders
+ * fill in the correct values for $user
*
- * @param string $input
+ * @param string $user
* @param string $input
* @return string
*/
@@ -306,6 +311,7 @@ class Filesystem {
*/
static public function tearDown() {
self::clearMounts();
+ self::$defaultInstance = null;
}
/**
@@ -620,10 +626,11 @@ class Filesystem {
* get the content of a directory
*
* @param string $directory path under datadirectory
+ * @param string $mimetype_filter limit returned content to this mimetype or mimepart
* @return array
*/
- public static function getDirectoryContent($directory) {
- return self::$defaultInstance->getDirectoryContent($directory);
+ public static function getDirectoryContent($directory, $mimetype_filter = '') {
+ return self::$defaultInstance->getDirectoryContent($directory, $mimetype_filter);
}
/**
@@ -659,8 +666,4 @@ class Filesystem {
}
}
-\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
-\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
-\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook');
-
\OC_Util::setupFS();