src/Common/Helper/File.php
public static function isDirCS($sDir)
    {
        if (array_key_exists($sDir, static::$aIsDirCache)) {
            return static::$aIsDirCache[$sDir];
        }

        $aDirBits = explode(DIRECTORY_SEPARATOR, $sDir);
        $bResult  = true;
        while (count($aDirBits) > 1) {
            $sDirectory     = array_pop($aDirBits);
            $sDirectoryPath = implode(DIRECTORY_SEPARATOR, $aDirBits);
            $aDirectories   = array_map(function ($sDirectory) {
                return basename($sDirectory);
            }, glob($sDirectoryPath . DIRECTORY_SEPARATOR . '*', GLOB_NOSORT | GLOB_ONLYDIR));

            if (!in_array($sDirectory, $aDirectories)) {
                $bResult = false;
                break;
            }
        }

        static::$aIsDirCache[$sDir] = $bResult;
        return $bResult;
    }
public static function isDirCS($sDir)
    {
        if (array_key_exists($sDir, static::$aIsDirCache)) {
            return static::$aIsDirCache[$sDir];
        }

        $aDirBits = explode(DIRECTORY_SEPARATOR, $sDir);
        $bResult  = true;
        while (count($aDirBits) > 1) {
            $sDirectory     = array_pop($aDirBits);
            $sDirectoryPath = implode(DIRECTORY_SEPARATOR, $aDirBits);
            $aDirectories   = array_map(function ($sDirectory) {
                return basename($sDirectory);
            }, glob($sDirectoryPath . DIRECTORY_SEPARATOR . '*', GLOB_NOSORT | GLOB_ONLYDIR));

            if (!in_array($sDirectory, $aDirectories)) {
                $bResult = false;
                break;
            }
        }

        static::$aIsDirCache[$sDir] = $bResult;
        return $bResult;
    }
public static function isDirCS ( $ sDir ) { if ( array_key_exists ( $ sDir , static :: $ aIsDirCache ) ) { return static :: $ aIsDirCache [ $ sDir ] ; } $ aDirBits = explode ( DIRECTORY_SEPARATOR , $ sDir ) ; $ bResult = true ; while ( count ( $ aDirBits ) > 1 ) { $ sDirectory = array_pop ( $ aDirBits ) ; $ sDirectoryPath = implode ( DIRECTORY_SEPARATOR , $ aDirBits ) ; $ aDirectories = array_map ( function ( $ sDirectory ) { return basename ( $ sDirectory ) ; } , glob ( $ sDirectoryPath . DIRECTORY_SEPARATOR . '*' , GLOB_NOSORT | GLOB_ONLYDIR ) ) ; if ( ! in_array ( $ sDirectory , $ aDirectories ) ) { $ bResult = false ; break ; } } static :: $ aIsDirCache [ $ sDir ] = $ bResult ; return $ bResult ; }
A case-sensitive is_dir

@param string $sDir The directory to trst

@return bool
A case - sensitive is_dir