{
if ($check && !file_exists($from)) {
$this->throwError(sprintf('File "%s" doesn\'t exist (to %s)', $from, $to));
+ return $this;
}
$realto = $this->path($to);
if (!$realto) {
{
if (!file_exists($from)) {
$this->throwError(sprintf('Directory %s doen\'t exist', $from));
+ return $this;
}
$this->_directories[$this->path($to)] = $from;
return $this;
{
$existing = array();
-
foreach ($this->_directories as $to => $from) {
$this->_addDirectory($from, $to);
}
if (!file_exists($from)) {
$this->throwError(sprintf('Failed to copy %s to %s. Source doesn\'t exist', $from, $to));
+ continue;
}
if (!file_exists($to) || filesize($from) !== filesize($to) || filemtime($from) !== filemtime($to)) {
`cp -p $from_esc $to_esc`;
if (!file_exists($to)) {
$this->throwError(sprintf('Failed to copy %s to %s', $from, $to));
+ continue;
}
}
}