<?php
/**
- * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
* Update the cache for $path
*
* @param string $path
+ * @param int $time
*/
- public function update($path) {
+ public function update($path, $time = null) {
/**
* @var \OC\Files\Storage\Storage $storage
* @var string $internalPath
$data = $scanner->scan($internalPath, Scanner::SCAN_SHALLOW);
$this->correctParentStorageMtime($storage, $internalPath);
$cache->correctFolderSize($internalPath, $data);
+ $this->propagator->propagateChanges($time);
}
}
$cache->remove($internalPath);
$cache->correctFolderSize($parent);
$this->correctParentStorageMtime($storage, $internalPath);
+ $this->propagator->propagateChanges();
}
}
$this->remove($source);
$this->update($target);
}
+ $this->propagator->propagateChanges();
}
}
- /**
- * propagate the updates to their parent folders
- *
- * @param int $time (optional) the mtime to set for the folders, if not set the current time is used
- */
- public function propagate($time = null) {
- $this->propagator->propagateChanges($time);
- }
-
/**
* update the storage_mtime of the parent
*
fclose($target);
fclose($data);
$this->updater->update($path);
- $this->updater->propagate();
if ($this->shouldEmitHooks($path) && $result !== false) {
$this->emit_file_hooks_post($exists, $path);
}
if ((Cache\Scanner::isPartialFile($path1) && !Cache\Scanner::isPartialFile($path2)) && $result !== false) {
// if it was a rename from a part file to a regular file it was a write and not a rename operation
$this->updater->update($path2);
- $this->updater->propagate();
if ($this->shouldEmitHooks()) {
$this->emit_file_hooks_post($exists, $path2);
}
} elseif ($this->shouldEmitHooks() && $result !== false) {
$this->updater->rename($path1, $path2);
- $this->updater->propagate();
\OC_Hook::emit(
Filesystem::CLASSNAME,
Filesystem::signal_post_rename,
}
}
$this->updater->update($path2);
- $this->updater->propagate();
if ($this->shouldEmitHooks() && $result !== false) {
\OC_Hook::emit(
Filesystem::CLASSNAME,
if (in_array('delete', $hooks)) {
$this->updater->remove($path);
- $this->updater->propagate();
}
if (in_array('write', $hooks)) {
$this->updater->update($path);
- $this->updater->propagate();
}
if (in_array('touch', $hooks)) {
- $this->updater->update($path);
- $this->updater->propagate($extraParam);
+ $this->updater->update($path, $extraParam);
}
if ($this->shouldEmitHooks($path) && $result !== false) {