aboutsummaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/ajax/rawlist.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/files/ajax/rawlist.php b/files/ajax/rawlist.php
new file mode 100644
index 00000000000..0abe81e6725
--- /dev/null
+++ b/files/ajax/rawlist.php
@@ -0,0 +1,23 @@
+<?php
+
+// only need filesystem apps
+$RUNTIME_APPTYPES=array('filesystem');
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+OC_JSON::checkLoggedIn();
+
+// Load the files
+$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+
+// make filelist
+$files = array();
+foreach( OC_Files::getdirectorycontent( $dir ) as $i ){
+ $i["date"] = OC_Util::formatDate($i["mtime"] );
+ $files[] = $i;
+}
+
+OC_JSON::success(array('data' => $files));
+
+?>