Send by the client to request an analysis of a given file. Answered by either an FlowrErrorMessage or a FileAnalysisResponseMessageJson.

interface FileAnalysisRequestMessage {
    cfg?: boolean;
    content?: string;
    filename?: string;
    filepath?: string | readonly string[];
    filetoken?: string;
    format?: "json" | "n-quads";
    id: undefined | string;
    type: "request-file-analysis";
}

Hierarchy (view full)

Hierarchy-Diagram

UML class diagram of FileAnalysisRequestMessage

Properties

cfg?: boolean

Can be used to additionally extract the ControlFlowInformation of the file, which is not exposed (and not fully calculated) by default.

content?: string

The contents of the file, or an R expression itself (like 1 + 1), give either this or the filepath. If you want to load multiple R files as one, either use filepath or concatenate the file-contents for this field.

filename?: string

A human-readable file name. If you present a filepath or read from a file this should be straightforward. However, the name is only for debugging and bears no semantic meaning.

filepath?: string | readonly string[]

The filepath on the local machine, accessible to flowR, or simply. Give either this or the content. If you want to load multiple R files as one, either use this or concatenate the file-contents for the content.

filetoken?: string

This is a unique token that you assign to subsequently slice the respective files. If you pass the same token multiple times, previous results will be overwritten.

If you do not pass a file token, the server will not store the results!

format?: "json" | "n-quads"

Controls the serialization of the results (and the ControlFlowGraph if the corresponding flag is set). If missing, we assume json.

id: undefined | string

The id that links a request with its responses, it is up to the calling client to make sure it is unique. However, the client does not have to pass the id if it does not need to link the request with its response. The id is always undefined if the message is unprompted (e.g., with hello) or the id unknown.

type: "request-file-analysis"

The at this time unknown type