Gocator API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
kStatus GoSensor_CopyFile ( GoSensor  sensor,
const kChar sourceName,
const kChar destName 
)

Copies a file within the connected sensor.

If the destination file name is GO_SENSOR_LIVE_JOB_NAME, then the configuration job file used by the sensor is changed (ie. a job/load switch operation takes place). To do a job load/switch, the sensor is first stopped before the job load/switch. After the job load/switch, the sensor remains stopped, to match the behaviour of loading/switching a job file from the GUI.

WARNING! This operation writes to flash storage. Review the user manual for implications.

NOTE: if doing a job load/switch, this API leaves the sensor stopped. User must explicitly start the sensor again.

Version
Introduced in firmware 4.0.10.27
Parameters
sensorGoSensor object.
sourceNameSource name for the file to be copied.
destNameDestination name for the file (maximum 63 characters).
Returns
Operation status.
Remarks
Calling this function can result in writing operations to flash storage if the destination is not a live file(e.g. "_live.job"). Should the process be disrupted due to power loss or other factors, the sensor may enter Rescue mode.
See also
GoSensor_UploadFile()