public function change($filePath, $original, $updated)
{
if ($original === $updated) {
return false;
}
$oHash = sha1($original);
if (empty($this->_staged['change'][$filePath])) {
$this->_staged['change'][$filePath][] = $oHash;
$o = new File(TMP . 'upgrade' . DS . $oHash, true);
$o->write($original);
} else {
$oHash = reset($this->_staged['change'][$filePath]);
}
$uHash = sha1($updated);
if ($uHash === end($this->_staged['change'][$filePath])) {
return false;
}
$u = new File(TMP . 'upgrade' . DS . $uHash, true);
$u->write($updated);
$this->_staged['change'][$filePath][] = $uHash;
return true;
}