src/Service/Misc/File.php
public function fileIsReadable($filePath)
    {
        $filePath = realpath($filePath);

        // Return the cache, if we have any.
        if (isset(static::$isReadableCache[$filePath]) === true) {
            return static::$isReadableCache[$filePath];
        }

        // Set the cache and return it.
        return static::$isReadableCache[$filePath] = is_readable($filePath) && is_file($filePath);
    }
public function fileIsReadable($filePath)
    {
        $filePath = realpath($filePath);

        // Return the cache, if we have any.
        if (isset(static::$isReadableCache[$filePath]) === true) {
            return static::$isReadableCache[$filePath];
        }

        // Set the cache and return it.
        return static::$isReadableCache[$filePath] = is_readable($filePath) && is_file($filePath);
    }
public function fileIsReadable ( $ filePath ) { $ filePath = realpath ( $ filePath ) ; // Return the cache, if we have any. if ( isset ( static :: $ isReadableCache [ $ filePath ] ) === true ) { return static :: $ isReadableCache [ $ filePath ] ; } // Set the cache and return it. return static :: $ isReadableCache [ $ filePath ] = is_readable ( $ filePath ) && is_file ( $ filePath ) ; }
Checks if a file exists and is readable, with some caching.

@param string $filePath
The path to the file we are checking.

@return bool
If the file is readable, or not.
Checks if a file exists and is readable with some caching .