summaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-26 12:30:25 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-26 12:30:25 +0200
commit39adadd3e3e50dcf3bf577a22870aaec52f63052 (patch)
treea2358c00ee236a76c0691bf5211fcfbc4a44c1ab /lib/files/filesystem.php
parent0e2bf8d37396748d29d24b6a0789fa85b4c58f20 (diff)
downloadnextcloud-server-39adadd3e3e50dcf3bf577a22870aaec52f63052.tar.gz
nextcloud-server-39adadd3e3e50dcf3bf577a22870aaec52f63052.zip
move the cache api from OC_Files to filesystem(view)
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index b7f8483fbf9..d735cf8626a 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -609,6 +609,33 @@ class Filesystem {
}
return $path;
}
+
+ /**
+ * get the filesystem info
+ *
+ * @param string $path
+ * @return array
+ *
+ * returns an associative array with the following keys:
+ * - size
+ * - mtime
+ * - mimetype
+ * - encrypted
+ * - versioned
+ */
+ public static function getFileInfo($path) {
+ return self::$defaultInstance->getFileInfo($path);
+ }
+
+ /**
+ * get the content of a directory
+ *
+ * @param string $directory path under datadirectory
+ * @return array
+ */
+ public static function getDirectoryContent($directory, $mimetype_filter = '') {
+ return self::$defaultInstance->getDirectoryContent($directory, $mimetype_filter);
+ }
}
\OC_Hook::connect('OC_Filesystem', 'post_write', 'OC_Filesystem', 'removeETagHook');