]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/Storage.php
Add move function to storage manager and console command
[friendica.git] / src / Core / Console / Storage.php
index a03743f253da1d4efde29adf30319f482ae7c498..9db2a123f2d335087ca910ea6a8b1a3c6a1fedb6 100644 (file)
@@ -105,6 +105,12 @@ HELP;
 
        protected function do_move()
        {
+               if (count($this->args) !== 1) {
+                       throw new CommandArgsException('Invalid arguments');
+               }
 
+               $current = StorageManager::getBackend();
+               $r = StorageManager::move($current);
+               $this->out(sprintf("Moved %d files", $r));
        }
 }