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;
}