Replication.saveDirectory (Method)

Saves information about a directory that CommonSpot will scan as it looks for files that it should replicate.

Returns:

ReplicationDirectoryID (integer)

Arguments:

Name Type Required Description
id ReplicationDirectoryID_0 Required A replication directory's ID. If this value is 0, CommonSpot creates a new replication directory.
type ReplicationDirType Required A string indicating the type of the directory ('SiteRelative', 'SubsiteRelative', or 'External'). An empty string tells CommonSpot to return all directories.
directory PlainText_NonNull_255 Required The directory to scan.
scanAction ReplicationScanType Required A string describing when to scan the directory for replication. Possible values are 'Always Scan', 'Scan only on Full Replication', or 'On Content Change'.
includeSubdirectories Boolean Required Boolean flag which when set to true indicates that CommonSpot scans a subsite's subdirectories in addition to the specified directory.
oneTimeScan Boolean Required Boolean flag which when set to true indicates that the directory is scanned the next time replication occurs. After this scan, CommonSpot no longer scans the directory.
cachingOptions ReplicationCacheOption Required String representing the action to perform against the target server's cache when CommonSpot is replicating the source server. Examples are 'Clear Entire Cache', 'Clear Subsite Cache', and so on.

Context:

License Requirements Replication
Permission Requirements site:ManageReplication
Deny Context None
Require Context AuthoringEnabled
Author Lock (not required)
Transaction Logging If transaction logging is enabled at the server level, calls to this method will be logged
Customization This method may be customized at the site level

Error Codes:

Code Error Message
36004 The specified '$1' directory cannot be an empty string.
36008 The directory '$1' does not exist.
36009 Another record with the specified replication directory name already exists.
36011 Caching options cannot be 'Clear Subsite Cache' or 'Clear Subsite and Below Cache' if the type is 'External Directory'.
36029 Type cannot be changed while editing a replication directory.

Notes:

None