obj objRef mirror

Available for: Content Management Server (from Version 6.5.0)

Task: Creates a mirror file of the specified file. The original file itself must not be a mirror file.

Syntax:

obj (withId objId) | (withPath path) | root mirror {parameter value}

Function parameters:

  • parent specifies that value specifies the path or the ID of the destination folder. If this parameter is missing, it is assumed that the destination folder is the folder containing the original file.
  • name specifies that value specifies the name of the mirror file. If this parameter is missing, the name of the original file will be used. If this name already exists in the destination folder, a new name will be calculated by appending the next available number to the name.

Return value if successful: the ID of the new file (string)

Necessary permissions:

  • The user must have the permissionRoot permission for the original file.
  • The user must have the permissionCreateChildren permission for the destination folder.
  • The user must have the permissionGlobalMirrorHandling global permission.

Additional information: The permissionGlobalMirrorHandling permission does not include the permission to delete mirror files. However, when a mirror file is created, the permissionRoot permission of this mirror file is assigned to the same groups who have been granted the permissionCreateChildren permission for the parent folder of the mirror file. As a consequence, a user who has created a mirror file is permitted to delete it (as long as he has the permissionRoot permission via his group membership or has the permissionGlobalRoot permission).

Example:

CM>obj withId 20099 mirror parent /news/latestnews name incoming
65811