Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Writes out the current sync spec to the specified file as XML. 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.

WriteToFile(filename As String, options As roAssociativeArray) As Boolean

Writes out the current sync spec to the specified file as XML or JSON. The options associative array can currently contain the format parameter, which can have a value of "xml" or "json". Because the XML/JSON 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.

...

Writes out the current sync spec to a string and returns it as XML. This method returns an empty string if the write operation fails.

WriteToString(options As roAssociativeArray) As String

Writes out the current sync spec to a string and returns it as XML or JSON. The options associative array can currently contain the format parameter, which can have a value of "xml" or "json". This method returns an empty string if the write operation fails.

...

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.

If the sync spec is formatted as XML, then all returned values will be strings. If the spec spec is formatted as JSON, the JavaScript types will be converted as follows:

JavaScript typeBrightScript type
ArrayroArray
ObjectroAssociativeArray
StringString
BooleanBoolean
NumberDouble
NullInvalid
LookupMetadata(section As String, field As String) As String

...

Code Block
filtered_spec = spec.FilterFiles("download", { group: "scripts" })
FilesEqualTo(

...

spec As

...

roSyncSpec) As Boolean

...

Compares the contents of the sync spec to another sync spec and returns true if they're identical. This method compares the parsed contents of the sync specs, rather than the XML/JSON itself.

GetAssets(

...

section As String) As Object

Retrieves a list of assets from the sync spec in a form that's compatible with roAssetPool and its associated objects.