omniClientCopy

Defined in OmniClient.h

OmniClientRequestId omniClientCopy(char const *srcUrl, char const *dstUrl, void *userData, OmniClientCopyCallback callback, OmniClientCopyBehavior behavior, const char *message)

Copy a thing from ‘srcUrl’ to ‘dstUrl’.

The thing can be anything that supports copying (files, folders, etc..)

If both src and dst are on the same server, this is done on the server Otherwise the file is first downloaded from ‘src’ then uploaded to ‘dst’

Destination folders will be created as needed.

Returns eOmniClientResult_ErrorAlreadyExists if “dstUrl” already exists unless you specify ‘behavior’ as eOmniClientCopy_Overwrite

Trailing slashes are ignored!

The message parameter is applied to the atomic checkpoint created of dstUrl after the copy is complete.

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.