From: Vincent Vanwaelscappel Date: Fri, 27 Jan 2023 07:49:46 +0000 (+0100) Subject: wip #5700 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d82fd8f660c3f6c0c4bc7a724d734fc23b868e17;p=cubist_util.git wip #5700 @0.5 --- diff --git a/src/CommandLine/Rclone.php b/src/CommandLine/Rclone.php index d93c1e5..74153ff 100644 --- a/src/CommandLine/Rclone.php +++ b/src/CommandLine/Rclone.php @@ -20,6 +20,18 @@ class Rclone extends CommandLine */ protected $_mirror = false; + /** + * @var bool + */ + protected $_dryRun = false; + + /** + * @var string + */ + protected $_protocol='local'; + + protected $_rcloneArgs = []; + public function __construct($output = null, $error = true) { parent::__construct($this->_prog, $output, $error); @@ -57,4 +69,41 @@ class Rclone extends CommandLine $this->_mirror = $mirror; return $this; } + + public function setRcloneArg($name, $value = null) + { + $this->_rcloneArgs[] = [$name, $value]; + } + + /** + * @param bool $dryRun + */ + public function setDryRun(bool $dryRun): void + { + $this->_dryRun = $dryRun; + } + + /** + * @return string + */ + public function getProtocol(): string + { + return $this->_protocol; + } + + /** + * @param string $protocol + */ + public function setProtocol(string $protocol): void + { + $this->_protocol = $protocol; + } + + /** + * @return bool + */ + public function isDryRun(): bool + { + return $this->_dryRun; + } } \ No newline at end of file