private function doCopy(FilesystemInterface $fsOrigin, FilesystemInterface $fsTarget, $origin, $target, $override) { if ($fsTarget->has($target) && ($override === false || $override === null && $fsOrigin->getTimestamp($origin) <= $fsTarget->getTimestamp($target))) { return; } $buffer = $fsOrigin->readStream($origin); $fsTarget->putStream($target, $buffer); $buffer->close(); }