Of course, Wikidot is not Subversion or Git, it doesn't have file locking or any clever stuff.
It does provide a revision history and the ability to annotate, so I'm thinking this is more for public presentation than as a working tool.
Option 1
If you make a live template like this:
[[code]]
%%content%%
[[/code]]
Then your pages can be pure code and still display correctly (with syntax highlighting if you set the template right.)
A fairly simple API application could be written to upload and download an entire project.
The only fault with it is that you can't append "code/1" and download the file using http.
Option 2
If the API client application adds and removes the [[code]]…[[/code]] tags, then you can provide a download link as well.
The live template becomes:
[[span class="button"]][/%%fullname%%/code/1 Download][[/span]]
%%content%%