createFolders
Cria a estrutura de diretorios para a guarda dos arquivos
public static createFolders ( string $dirPath ) : boolean | ||
$dirPath | string | path do diretorio a ser criado |
return | boolean |
/** * zFolderMTest * @param string $path * @return array */ protected static function zFolderMTest($path = '') { $aResp = array('status' => true, 'msg' => ''); if ($path != '') { try { FilesFolders::createFolders($path); } catch (RuntimeException $e) { $aResp = array('status' => false, 'msg' => $e->getMessage()); } } return $aResp; }
/** * @expectedException PHPUnit_Framework_Error_Warning * @expectedExceptionMessage mkdir(): Permission denied */ public function testCreateFoldersFail() { $folderBase = '/root'; FilesFolders::createFolders($folderBase); }