2013-06-23 15:49:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../../lib/base.php';
|
|
|
|
|
|
|
|
if (OC::$CLI) {
|
|
|
|
if (count($argv) === 2) {
|
|
|
|
$file = $argv[1];
|
|
|
|
list(, $user) = explode('/', $file);
|
2014-05-11 13:34:54 +00:00
|
|
|
OCP\JSON::checkUserExists($user);
|
2013-06-23 15:49:38 +00:00
|
|
|
OC_Util::setupFS($user);
|
|
|
|
$view = new \OC\Files\View('');
|
|
|
|
/**
|
|
|
|
* @var \OC\Files\Storage\Storage $storage
|
|
|
|
*/
|
|
|
|
list($storage, $internalPath) = $view->resolvePath($file);
|
|
|
|
$watcher = $storage->getWatcher($internalPath);
|
|
|
|
$watcher->checkUpdate($internalPath);
|
|
|
|
} else {
|
|
|
|
echo "Usage: php triggerupdate.php /path/to/file\n";
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo "This script can be run from the command line only\n";
|
|
|
|
}
|