Last active
April 23, 2017 21:44
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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