protected $_followSymlinks = false;
protected $_copySymlinksAsSymlinks = false;
+ protected $_preserveTimes = true;
+ protected $_preservePermissions = true;
+ protected $_preserveOwner = false;
+
public function getSshKey()
{
return $path;
}
+ /**
+ * @param bool $preserveOwner
+ */
+ public function setPreserveOwner(bool $preserveOwner): void
+ {
+ $this->_preserveOwner = $preserveOwner;
+ }
+
+ /**
+ * @param bool $preservePermissions
+ */
+ public function setPreservePermissions(bool $preservePermissions): void
+ {
+ $this->_preservePermissions = $preservePermissions;
+ }
+
+ /**
+ * @param bool $preserveTimes
+ */
+ public function setPreserveTimes(bool $preserveTimes): void
+ {
+ $this->_preserveTimes = $preserveTimes;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getPreserveOwner(): bool
+ {
+ return $this->_preserveOwner;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getPreservePermissions(): bool
+ {
+ return $this->_preservePermissions;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getPreserveTimes(): bool
+ {
+ return $this->_preserveTimes;
+ }
+
protected function _preExecute()
{
$dest = $this->getFinalDest();
if ($this->getCopySymlinksAsSymlinks()) {
$this->setArg('l');
}
+ if($this->getPreserveTimes()){
+ $this->setArg('t');
+ }
+ if($this->getPreserveOwner()){
+ $this->setArg('o');
+ $this->setArg('g');
+ }
+ if($this->getPreservePermissions()){
+ $this->setArg('p');
+ }
foreach ($this->_excludes as $e) {
$this->setArg('exclude', $e);
}