src/Common/Helper/File.php
public static function fileExistsCS($sFilename)
    {
        if (array_key_exists($sFilename, static::$aFileExistsCache)) {
            return static::$aFileExistsCache[$sFilename];
        }

        $sDirectory = dirname($sFilename);
        $aFiles     = array_map(function ($sFile) {
            return basename($sFile);
        }, glob($sDirectory . DIRECTORY_SEPARATOR . '*', GLOB_NOSORT));

        if (in_array(basename($sFilename), $aFiles)) {
            //  Test if the directory exists
            $bResult = static::isDirCS($sDirectory);
        } else {
            $bResult = false;
        }

        static::$aFileExistsCache[$sFilename] = $bResult;
        return $bResult;
    }
public static function fileExistsCS($sFilename)
    {
        if (array_key_exists($sFilename, static::$aFileExistsCache)) {
            return static::$aFileExistsCache[$sFilename];
        }

        $sDirectory = dirname($sFilename);
        $aFiles     = array_map(function ($sFile) {
            return basename($sFile);
        }, glob($sDirectory . DIRECTORY_SEPARATOR . '*', GLOB_NOSORT));

        if (in_array(basename($sFilename), $aFiles)) {
            //  Test if the directory exists
            $bResult = static::isDirCS($sDirectory);
        } else {
            $bResult = false;
        }

        static::$aFileExistsCache[$sFilename] = $bResult;
        return $bResult;
    }
public static function fileExistsCS ( $ sFilename ) { if ( array_key_exists ( $ sFilename , static :: $ aFileExistsCache ) ) { return static :: $ aFileExistsCache [ $ sFilename ] ; } $ sDirectory = dirname ( $ sFilename ) ; $ aFiles = array_map ( function ( $ sFile ) { return basename ( $ sFile ) ; } , glob ( $ sDirectory . DIRECTORY_SEPARATOR . '*' , GLOB_NOSORT ) ) ; if ( in_array ( basename ( $ sFilename ) , $ aFiles ) ) { //  Test if the directory exists $ bResult = static :: isDirCS ( $ sDirectory ) ; } else { $ bResult = false ; } static :: $ aFileExistsCache [ $ sFilename ] = $ bResult ; return $ bResult ; }
A case-sensitive file_exists

@param string $sFilename The file to test

@return bool
A case - sensitive file_exists