Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active April 23, 2017 21:44
Show Gist options
  • Save scripting/db7df50550a6481ef66bbfdd273dab68 to your computer and use it in GitHub Desktop.
Save scripting/db7df50550a6481ef66bbfdd273dab68 to your computer and use it in GitHub Desktop.
An example of a River5 callback script that's called whenever a river is built
//two globals are set up by River5 for buildRiver callbacks, fname and jsontext.
//this example creates a copy of the river in a folder on another disk, named Montreal.
var f = "/Volumes/Montreal/tmp/rivers/" + fname;
fsSureFilePath (f, function () {
fs.writeFile (f, jsontext);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment