library/Services/Library/FileHandler.php
public function createDirectory($directoryPath, $permissions = 0777)
    {
        $current = '';
        $parts = array_filter(explode('/', $directoryPath));
        foreach ($parts as $part) {
            $current = "$current/$part";
            if (!empty($part) && !file_exists($current)) {
                mkdir($current, $permissions);
                chmod($current, $permissions);
            }
        }
    }
public function createDirectory($directoryPath, $permissions = 0777)
    {
        $current = '';
        $parts = array_filter(explode('/', $directoryPath));
        foreach ($parts as $part) {
            $current = "$current/$part";
            if (!empty($part) && !file_exists($current)) {
                mkdir($current, $permissions);
                chmod($current, $permissions);
            }
        }
    }
public function createDirectory ( $ directoryPath , $ permissions = 0777 ) { $ current = '' ; $ parts = array_filter ( explode ( '/' , $ directoryPath ) ) ; foreach ( $ parts as $ part ) { $ current = "$current/$part" ; if ( ! empty ( $ part ) && ! file_exists ( $ current ) ) { mkdir ( $ current , $ permissions ) ; chmod ( $ current , $ permissions ) ; } } }
Creates directory with write permissions

@param string $directoryPath
@param int    $permissions
Creates directory with write permissions