summaryrefslogtreecommitdiffstats
path: root/files/ajax/scan.php
diff options
context:
space:
mode:
Diffstat (limited to 'files/ajax/scan.php')
-rw-r--r--files/ajax/scan.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/files/ajax/scan.php b/files/ajax/scan.php
new file mode 100644
index 00000000000..dec949a819b
--- /dev/null
+++ b/files/ajax/scan.php
@@ -0,0 +1,16 @@
+<?php
+
+require_once '../../lib/base.php';
+
+$force=isset($_GET['force']) and $_GET['force']=='true';
+$checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true';
+
+//create the file cache if necesary
+if($force or !OC_FileCache::inCache('')){
+ if(!$checkOnly){
+ OC_FileCache::scan('');
+ }
+ OC_JSON::success(array("data" => array( "done" => true)));
+}else{
+ OC_JSON::success(array("data" => array( "done" => false)));
+} \ No newline at end of file