Blame view
sources/apps/files/triggerupdate.php
602 Bytes
|
03e52840d
|
1 2 3 4 5 6 7 8 |
<?php
require_once __DIR__ . '/../../lib/base.php';
if (OC::$CLI) {
if (count($argv) === 2) {
$file = $argv[1];
list(, $user) = explode('/', $file);
|
|
a293d369c
|
9 |
OCP\JSON::checkUserExists($owner); |
|
03e52840d
|
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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
";
}
} else {
echo "This script can be run from the command line only
";
}
|