Testing Transport Wr21 and Digi Connect SP with the Serial to DC sample application. With each line of data sent to the Device Cloud it writes a new file adding an index number(test1.txt, test2.txt). If the device reboots the index resets and begins writing over critical data. Can I remove the index and append the file that was sent to the Cloud putting all my data in one file as it is sent one line at a time. I found this information referencing a Cloud Connector device that I believe is depreciated. Can a file already in the Device Cloud be appended?
Append data to an existing file in Device Cloud
view sourceprint?
01
import com.etherios.connector.core.DataStream;
02
03
[…]
04
05
// Path and name of the file to append the data in Device Cloud
06
static final String DEST_PATH = “existingFile.txt”;
07
08
[…]
09
10
CloudConnector connector = …;
11
String dataToAppend = “This is the string text to be append.”;
12
13
// Append to an existing file in Device Cloud the given string
14
connector.appendDataToRemoteFile(dataToAppend, DEST_PATH);
15
16
[…]