Kedrigern\phpIO\Files::move PHP Метод

move() публичный Метод

Move files to the $path
public move ( string $path, boolean $create = false ) : Files
$path string
$create boolean
Результат Files $this
    public function move($path, $create = false)
    {
        chdir($this->dir);
        if (!is_dir($path)) {
            if ($create) {
                mkdir($path);
            } else {
                throw new PathIsNotDir($path);
            }
        }
        foreach ($this->files as $file) {
            rename($file, $path . '/' . $file);
        }
        chdir($this->originDir);
        return $this;
    }