Rosyncspec – BrightSign Object Reference Manual (FW 5.1) User Manual
Page 191

183
roSyncSpec
This object represents a parsed sync spec. It allows you to retrieve various parts of the specification with methods.
Interfaces: ifSyncSpec, ifInternalSyncSpec, ifInstanceFromStream
The ifSyncSpec interface provides the following:
•
GetFailureReason() As String: Returns information if an roSyncSpec method indicates failure.
•
ReadFromFile(filename As String) As Boolean: Populates the sync spec by reading the specified file.
This method returns True upon success and False upon failure.
•
ReadFromString(spec As String) As Boolean: Populates the sync spec by reading the passed string.
This method returns True upon success and False upon failure.
•
WriteToFile(filename As String) As Boolean: Writes out the current sync spec to the specified file.
Because the XML is regenerated, it is possible this file may not be textually identical to the specification that was
read. This method returns True upon success and False upon failure.
•
WriteToString() As String: Writes out the current sync spec to a string and returns it. This method returns
an empty string if the write operation fails.
•
GetMetadata(section As String) As roAssociativeArray: Returns an roAssociativeArray object
containing the information stored in the specified metadata section of the sync spec (typically "client" or "server").
This method returns 0 if the read operation fails.
•
LookupMetadata(section As String, field As String) As String: Provides a shortcut for looking
up specified metadata items in the specified section without needing to create a temporary roAssociativeArray
object. This method returns an empty string if the read operation fails.
•
GetFileList(section As String) As roList: Returns an roList object containing roAssociativeArray
objects for each file in the specified section of the sync spec. This method returns Invalid if the read operation fails.