summaryrefslogtreecommitdiffstats
path: root/lib/public/files.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/files.php')
-rw-r--r--lib/public/files.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/public/files.php b/lib/public/files.php
index f6b3e0ee38a..4975bbb7dfa 100644
--- a/lib/public/files.php
+++ b/lib/public/files.php
@@ -31,7 +31,8 @@
namespace OCP;
/**
- * This class provides access to the internal filesystem abstraction layer. Use this class exlusively if you want to access files
+ * This class provides access to the internal filesystem abstraction layer. Use
+ * this class exlusively if you want to access files
*/
class Files {
/**
@@ -55,13 +56,24 @@ class Files {
}
/**
+ * search for files by mimetype
+ *
+ * @param string $query
+ * @return array
+ */
+ public function searchByMime($mimetype) {
+ return(\OC\Files\Filesystem::searchByMime( $mimetype ));
+ }
+
+ /**
* copy the contents of one stream to another
* @param resource source
* @param resource target
* @return int the number of bytes copied
*/
public static function streamCopy( $source, $target ) {
- return(\OC_Helper::streamCopy( $source, $target ));
+ list($count, $result) = \OC_Helper::streamCopy( $source, $target );
+ return $count;
}
/**