$eventSource->send('user', $user);
$scanner = new \OC\Files\Utils\Scanner($user, \OC::$server->getDatabaseConnection());
$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', array($listener, 'file'));
- $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', array($listener, 'folder'));
try {
if ($force) {
$scanner->scan($dir);
$this->eventSource = $eventSource;
}
- /**
- * @param string $path
- */
- public function folder($path) {
- $this->eventSource->send('folder', $path);
- }
-
public function file() {
$this->fileCount++;
if ($this->fileCount > $this->lastCount + 20) { //send a count update every 20 files