Skip to content

Instantly share code, notes, and snippets.

@Khobalt
Created May 12, 2017 21:51
Show Gist options
  • Save Khobalt/ab5bc46192671bd6bc743bed22bad165 to your computer and use it in GitHub Desktop.
Save Khobalt/ab5bc46192671bd6bc743bed22bad165 to your computer and use it in GitHub Desktop.
This gist demonstrates how to validate the files in a pool against their sha1 hashes.
CreateObject("roAssetPool", pool_path As String)
pool = CreateObject ("roAssetPool", "SD:/pool")
sync_spec = createObject("roSyncSpec")
sync_spec.readFromFile("path/to/sync.xml")
if pool.validate(sync_spec) then
print "Files match their sha1's"
else
print "Failure validating files"
print pool.getFailureReason()
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment