. * */ namespace OCA\Documents; class Storage { public static function getDocuments() { $list = array_filter( \OCP\Files::searchByMime('application/vnd.oasis.opendocument.text'), function($item){ //filter Deleted if (strpos($item['path'], '_trashbin')===0){ return false; } return true; } ); return $list; } /** * @brief Copy files to trash bin * @param array * * This function is connected to the delete signal of OC_Filesystem * to copy the file to the trash bin */ public static function onDelete($params) { if ( \OCP\App::isEnabled('files_trashbin') ) { $path = $params['path']; Trashbin::move2trash($path); } } }