]> source.dussan.org Git - nextcloud-server.git/commitdiff
add a searchbymime to the public api. Please all remember that access to internal...
authorFrank Karlitschek <frank@owncloud.org>
Tue, 19 Mar 2013 13:27:02 +0000 (14:27 +0100)
committerFrank Karlitschek <frank@owncloud.org>
Tue, 19 Mar 2013 13:27:02 +0000 (14:27 +0100)
lib/public/files.php

index 700bf574537fb6046743b8680c9152a07f8b9c3c..4975bbb7dfa03456b252ece8d0c89017113f6452 100644 (file)
@@ -55,6 +55,16 @@ class Files {
                return(\OC_Helper::getMimeType( $path ));
        }
 
+       /**
+        * 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