Table of Contents

File

Commands that provide access to logger instrument data and functions.

List Directory


List a directory on the device.

Command

Response

Example

Command

{
    "file": [{
        "command": "listdir",
        "type": "sd0",
        "path": "/"
    }]
}

Response

{
    "file": [{
        "command": "listdir",
        "statusCode": 0,
        "files": ["fileone.txt", "filetwo.bin"],
        "type": "sd0",
        "path": "/",
        "wait": 0
    }]
}


Write


Write a file.

Command

Response

Example

Command

80\r\n
{
    "file": [{
        "command":"write",
        "type":"flash",
        "path":"hardprofiledata.json",
        "filePosition":0,
        "binaryOffset":0,
        "binaryLength":434
    }]
}\r\n
1b2\r\n
<Binary Data>
0\r\n
\r\n

Response

{
    "file": [{
        "command":"write",
        "statusCode":0,
        "type":"flash",
        "path":"hardprofiledata.json",
        "actualFilePosition":0,
        "binaryOffset":0,
        "binaryLength":434,
        "wait":0
    }]
}


Read


Read a file.

Command

Response

Example

Command

{
    "file": [{
        "command":"read",
        "type":"flash",
        "path":"hardprofiledata.json",
        "filePosition":0,
        "requestedLength":-1
    }]
}

Response

80\r\n
{
    "file": [{
        "command":"read",
        "statusCode":0,
        "type":"flash",
        "path":"hardprofiledata.json",
        "actualFilePosition":0,
        "actualLength":-1,
        "binaryOffset":0,
        "binaryLength":454,
        "wait":0
    }]
}\r\n
1B2\r\n
<Binary Data>
0\r\n
\r\n


Get File Size


Delete a file on the device.

Command

Response

Example

Command

{
    "file":[{
        "command":"getFileSize",
        "type":"sd0",
        "path":"ch1.dlog"
    }]
}

Response

{
    "file":[{
        "command":"getFileSize",
        "statusCode":0,
        "type":"sd0",
        "path":"ch1.dlog",
        "actualFileSize":4070,
        "wait":0
    }]
}


Delete


Delete a file on the device.

Command

Response

Example

Command

{
    "file": [{
        "command": "delete",
        "type": "sd0",
        "path": "garbage.txt"
    }]
}

Response

{
    "file": [{
        "command": "delete",
        "statusCode": 0,
        "type": "sd0",
        "path": "garbage.txt",
        "wait": 0
    }]
}