]> _ Git - cubist_util.git/commitdiff
wip #5700 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Jan 2023 07:49:46 +0000 (08:49 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Jan 2023 07:49:46 +0000 (08:49 +0100)
src/CommandLine/Rclone.php

index d93c1e5f01a4de93f5453d7b24d25cfb0b22f2a3..74153fff9689c7ad42418f8cc0531734db55d8dc 100644 (file)
@@ -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