4 ide.write
therealkrispet edited this page 2019-11-18 10:59:50 +01:00

Request

  • Description: Overwrites the contents of a file.
  • Subscribers: IdeHandler, IdeComponent
{
    "key": "ide.write"
}
Parameter Type Required Description
filename string ✔️ Full path or basename of a file.
content string New contents of the selected file.

Example:

{
    "key": "ide.write",
    "filename": "main.c",
    "content": "#include <stdio.h>..."
}

Response

  • Description: Informs the frontend that the file was changed.
  • Subscribers: IdeComponent
{
    "key": "ide.write",
}
Parameter Type Required Description
filename string ✔️ Full path or basename of a file.
files array ✔️ List of every readable file according to the current patterns.

Example:

{
    "key": "ide.write",
    "filename": "main.c",
    "files": ["/home/main.c", "/home/not_main.c"]
}