app/File.php
public static function mkdir($path): bool
    {
        if (is_dir($path)) {
            return true;
        }

        if (dirname($path) && !is_dir(dirname($path))) {
            self::mkdir(dirname($path));
        }

        try {
            mkdir($path);

            return true;
        } catch (Throwable $ex) {
            return false;
        }
    }
public static function mkdir($path): bool
    {
        if (is_dir($path)) {
            return true;
        }

        if (dirname($path) && !is_dir(dirname($path))) {
            self::mkdir(dirname($path));
        }

        try {
            mkdir($path);

            return true;
        } catch (Throwable $ex) {
            return false;
        }
    }
public static function mkdir ( $ path ) : bool { if ( is_dir ( $ path ) ) { return true ; } if ( dirname ( $ path ) && ! is_dir ( dirname ( $ path ) ) ) { self :: mkdir ( dirname ( $ path ) ) ; } try { mkdir ( $ path ) ; return true ; } catch ( Throwable $ ex ) { return false ; } }
Create a folder, and sub-folders, if it does not already exist

@param string $path

@return bool Does the folder now exist
Create a folder and sub - folders if it does not already exist