public static function randomdir($where, $prefix = '', $suffix = '') {
        global $CFG;

        $dirname    = false;
        $randomname = self::uuidgen($prefix, $suffix, false);
        $newdirname = $where.DIRECTORY_SEPARATOR.$randomname;
        if (mkdir($newdirname)) {
            chmod($newdirname, $CFG->directorypermissions);
            $dirname = $randomname;
        }
        return $dirname;
    }
public static function randomdir($where, $prefix = '', $suffix = '') {
        global $CFG;

        $dirname    = false;
        $randomname = self::uuidgen($prefix, $suffix, false);
        $newdirname = $where.DIRECTORY_SEPARATOR.$randomname;
        if (mkdir($newdirname)) {
            chmod($newdirname, $CFG->directorypermissions);
            $dirname = $randomname;
        }
        return $dirname;
    }
public static function randomdir ( $ where , $ prefix = '' , $ suffix = '' ) { global $ CFG ; $ dirname = false ; $ randomname = self :: uuidgen ( $ prefix , $ suffix , false ) ; $ newdirname = $ where . DIRECTORY_SEPARATOR . $ randomname ; if ( mkdir ( $ newdirname ) ) { chmod ( $ newdirname , $ CFG -> directorypermissions ) ; $ dirname = $ randomname ; } return $ dirname ; }
Creates new folder with random name
@param string $where
@param string $prefix
@param string $suffix
@return mixed - directory short name or false in case of failure
Creates new folder with random name