JavaScript
import { createCognitioClient } from "@cognitio/sdk
const client = createCognitioClient()
await client.file.read({
...
}){
"type": "text",
"content": "<string>",
"diff": "<string>",
"patch": {
"oldFileName": "<string>",
"newFileName": "<string>",
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
"<string>"
]
}
],
"oldHeader": "<string>",
"newHeader": "<string>",
"index": "<string>"
},
"encoding": "base64",
"mimeType": "<string>"
}API Reference
Read file
Read the content of a specified file.
GET
/
file
/
content
JavaScript
import { createCognitioClient } from "@cognitio/sdk
const client = createCognitioClient()
await client.file.read({
...
}){
"type": "text",
"content": "<string>",
"diff": "<string>",
"patch": {
"oldFileName": "<string>",
"newFileName": "<string>",
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
"<string>"
]
}
],
"oldHeader": "<string>",
"newHeader": "<string>",
"index": "<string>"
},
"encoding": "base64",
"mimeType": "<string>"
}