src/File.php
public function exists(string $filePath, string $mode = self::READ_BINARY) : bool
    {
        if (self::INPUT_STREAM === $filePath) {
            return true;
        }

        if (self::READ_BINARY === $mode && ! file_exists($filePath)) {
            throw new FileException('File not found.');
        }

        return true;
    }
public function exists(string $filePath, string $mode = self::READ_BINARY) : bool
    {
        if (self::INPUT_STREAM === $filePath) {
            return true;
        }

        if (self::READ_BINARY === $mode && ! file_exists($filePath)) {
            throw new FileException('File not found.');
        }

        return true;
    }
public function exists ( string $ filePath , string $ mode = self :: READ_BINARY ) : bool { if ( self :: INPUT_STREAM === $ filePath ) { return true ; } if ( self :: READ_BINARY === $ mode && ! file_exists ( $ filePath ) ) { throw new FileException ( 'File not found.' ) ; } return true ; }
Check if file to read exists.

@param string $filePath
@param string $mode

@throws FileException

@return bool
Check if file to read exists .