files
- Description:
- IDE files API methods
- Source:
Methods
(async, static) add(path, content) → {Promise.<void>}
- Description:
- Adds a file
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
string | file path |
content |
string | file content |
Returns:
- Type
- Promise.<void>
(async, static) addBase64(path, base64Content) → {Promise.<void>}
- Description:
- Adds a binary file
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
string | file path |
base64Content |
string | base64-encoded file content |
Returns:
- Type
- Promise.<void>
(async, static) deleteFiles(paths)
- Description:
- Deletes the files
- Source:
Parameters:
Name | Type | Description |
---|---|---|
paths |
Array.<string> | file paths to delete |
(async, static) getContent(path)
- Description:
- Returns file content
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
string | file path |
(async, static) getContentBase64(path) → {Promise.<string>}
- Description:
- Returns binary file content as base64 encoded string
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
Returns:
- base64 encoded string
- Type
- Promise.<string>
(static) getStructure()
- Description:
- Returns file tree structure
- Source:
Type Definitions
FileChangeCallback(path, content)
- Description:
- File change callback
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
string | file path |
content |
string | file content |