NFePHP\Common\Files\FilesFolders::createFolders PHP Метод

createFolders() публичный статический Метод

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
Результат boolean
    public static function createFolders($dirPath)
    {
        //monta a arvore de diretórios necessária e estabelece permissões de acesso
        self::createFolder($dirPath);
        foreach (self::$ambientes as $ambiente) {
            $folder = $dirPath . DIRECTORY_SEPARATOR . $ambiente;
            self::createFolder($folder);
            foreach (self::$subdirs as $subdir) {
                $folder = $dirPath . DIRECTORY_SEPARATOR . $ambiente . DIRECTORY_SEPARATOR . $subdir;
                self::createFolder($folder);
            }
        }
        return true;
    }

Usage Example

Пример #1
0
 /**
  * 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;
 }
All Usage Examples Of NFePHP\Common\Files\FilesFolders::createFolders