File

Commands for handling files.

List

List current files

Parameters

None

Example

``` meshtech/diagnostics/cc3fc0fa8d21/command/file/list { "id":"10" } ```
meshtech/diagnostics/cc3fc0fa8d21/response/file/list
{
  "id":"10",
  "success":true,
  "result":[
    {
      "name":"update-bundle-genericx86-64.raucb",
      "size":"244696585"
    }
  ]
}

Cleanup

Remove all files in the /tmp/mtgw directory

Parameters

None

Example

``` meshtech/diagnostics/cc3fc0fa8d21/command/file/cleanup { "id":"11" } ```
meshtech/diagnostics/cc3fc0fa8d21/response/file/cleanup
{
  "id":"11",
  "success":true,
  "result":"Cleanup successful"
}

Write

Send a file to the gateway. If the file is large it can be sendt in chunks

Parameters

filename : the remote filename offset : Byte offset. If 0 then a new file is created data : file data in base64

Example

``` meshtech/diagnostics/cc3fc0fa8d21/command/file/write { "id":"12", "params":{ "filename":"loreipsum.txt", "offset":"0", "data":"TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ=" } } ```
meshtech/diagnostics/cc3fc0fa8d21/response/file/write
{
  "id":"12",
  "success":true,
  "result":"File upload successful"
}