public function testDeleteDirectory3() { File::makeDirectory(__DIR__ . '/dummy/tmp2'); File::copy(__DIR__ . '/dummy/dummy.jpg', __DIR__ . '/dummy/tmp2/dummy.jpg'); File::makeDirectory(__DIR__ . '/dummy/tmp2/test'); File::copy(__DIR__ . '/dummy/dummy.jpg', __DIR__ . '/dummy/tmp2/test/dummy.jpg'); $path = __DIR__ . '/dummy/tmp2/'; $this->assertTrue(File::deleteDirectory($path)); }
/** * Handle all DOCUMENTS file formats. * * @param string $fileInfo uploaded file information the same as $_FILE['input name'] + pathinfo['file name'] * @param string $filename filename to save the new file */ private function handleDocument($fileInfo, $filename) { self::directorize($this->path); $newPath = $this->prefix . $this->path . $filename; File::copy($fileInfo['tmp_name'], $newPath); }