Beispiel #1
0
 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));
 }
Beispiel #2
0
 /**
  * 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);
 }