Robot Web Services
3HAC050973-001 Revision:L, Application Manual - Robot Web Services
Copy a directory

Copy a directory

URL

/fileservice/{device|environment_variable}/{directory}

Method

POST

URL Params

None

See Common URL parameters

Data Params

  • fs-overwrite= true|false defaults to false. fs-get-directory-actions Required
  • fs-newname= The new directory name. See Notes below. Required
  • fs-action=copy Required

Success Response

NO_CONTENT(204)

Example Response

No content

Error Response

UNAUTHORIZED(401), NOT_FOUND(404), BAD_REQUEST(400), UNSUPPORTED_MEDIA(415), CONFLICT(409)

See Robot controller return codes

Sample Call

Create a copy of a directory

curl --digest -u "Default User":robotics -d "fs-newname=newdir&fs-action=copy" -X POST "http://localhost/fileservice/$home/testdir"

Notes

The value for fs-newname can either be absolute or relative. It is differentiated based on whether the value has a leading slash (absolute) or not (relative).

Note: when absolute paths are used, it should start from /fileservice e.g.

Absolute path : fs-newname=/fileservice/$home/copydir2

Relative to source path: fs-newname=copydir2

Supported in bootserver mode