/** * Cleanup anything a parser might have left (basically, remove the working dir) * @return void */ protected function cleanup() { // if $this->fs is an object, the Filesystem has been used, clean it up. if (is_object($this->fs)) { if ($this->fs->isDirectory($this->tempPath)) { $this->fs->deleteDirectory($this->tempPath, false); } } }
/** * Recursively delete a directory. * * The directory itself may be optionally preserved. * * @param string $path * @param bool $preserve * @return bool */ public function deleteDirectory($path, $preserve = false) { $path = Util::normalizePath($path); $this->assertPresent($path); return (bool) $this->adapter->deleteDirectory($path, $preserve); }
/** * @param $path */ public function removeDir($path) { $this->files->deleteDirectory($path); }