aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/rawlist.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-18 17:27:34 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-18 17:27:34 +0200
commit45de7ad221f9e505abdabcc5084dd12c80851469 (patch)
tree9afe2994fe01d35cf7aa2e16389c04bb3e298faf /apps/files/ajax/rawlist.php
parentdfc92675e0d76ad9550a274b712e084e1738831c (diff)
downloadnextcloud-server-45de7ad221f9e505abdabcc5084dd12c80851469.tar.gz
nextcloud-server-45de7ad221f9e505abdabcc5084dd12c80851469.zip
move files to app folder
Diffstat (limited to 'apps/files/ajax/rawlist.php')
-rw-r--r--apps/files/ajax/rawlist.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php
new file mode 100644
index 00000000000..8f1990d1b8f
--- /dev/null
+++ b/apps/files/ajax/rawlist.php
@@ -0,0 +1,26 @@
+<?php
+
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem');
+
+// Init owncloud
+
+require_once('../../lib/template.php');
+
+OC_JSON::checkLoggedIn();
+
+// Load the files
+$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+$mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : '';
+
+// make filelist
+$files = array();
+foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ){
+ $i["date"] = OC_Util::formatDate($i["mtime"] );
+ $i['mimetype_icon'] = $i['type'] == 'dir' ? mimetype_icon('dir'): mimetype_icon($i['mimetype']);
+ $files[] = $i;
+}
+
+OC_JSON::success(array('data' => $files));
+
+?>