Page:
ide.read
Pages
API reference
Building everything manually
Chat bot
Components
Console
Creating a TFW exercise
Event handlers
FSM
Frontend configuration
Home
Introduction
Key, intent and scope
Main repositories
Networking
Process management
Setting up a development environment
Terminal
Web IDE
console.read
console.write
deploy.finish
deploy.start
frontend.dashboard
frontend.ide
frontend.ready
frontend.site
fsm.trigger
fsm.update
history.bash
ide.read
ide.reload
ide.write
message.queue
message.send
process.log.new
process.log.set
process.restart
process.start
process.stop
terminal.write
tfw.sh script
Clone
10
ide.read
therealkrispet edited this page 2019-11-18 11:02:40 +01:00
Request
- Description: Attempts to fetch the contents of a file, then loads it in the IDE. You can also define new patterns for allowed files.
- Subscribers: FrontendProxyHandler, IdeHandler, IdeComponent
{
"key": "ide.read"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | string |
✔️ | Full path or basename of a file. |
| patterns | array |
Expects a list of glob patterns that will be matched against the absolute paths of file system nodes. Important: symbolic links are always resolved. |
Example:
{
"key": "ide.read",
"filename": "main.c"
}
Response
- Description: Returns with the content of the selected file.
- Subscribers: IdeComponent
{
"key": "ide.read"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| filename | string |
✔️ | Full path or basename of a file. |
| content | string |
✔️ | Content stored in the file. |
| files | array |
✔️ | List of every readable file according to the current patterns. |
Example:
{
"key": "ide.read",
"filename": "main.c",
"files": ["/home/main.c", "/home/not_main.c"],
"content": "#include <stdio.h>..."
}