Files

Copy file

Copy a file or directory between the host, a Zo App, and a fleet device.

Returns a message with the destination path and the number of bytes copied.

Parameters#

source_pathstringrequired

Absolute path of the file or directory to copy.

dest_pathstringrequired

Absolute destination path on the target.

source_zappstringdefault: ""

Optional Zo App slug or id the source lives on. Omit to read from the host. Requires the 'apps:shell' scope.

source_devicestringdefault: ""

Optional fleet device the source lives on. Omit to read from the host. Mutually exclusive with source_zapp. Requires the 'devices:manage' scope.

dest_zappstringdefault: ""

Optional Zo App slug or id to copy into (the app server is /zo-app/server.ts). Omit to write to the host. Requires the 'apps:shell' scope.

dest_devicestringdefault: ""

Optional fleet device to copy into. Omit to write to the host. Mutually exclusive with dest_zapp. Requires the 'devices:manage' scope.