~azzar1/unity/add-show-desktop-key

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
files.py

Interacting with.

To interact with the backend (at this stage) it's all done simply by accessing
URLs and providing GET vars. (Bad REST but I'll fix it later).

You just navigate to files.py/command?args in the browser, and it sends you
back a JSON file listing after performing your command.

The commands are:

ls?path=...
rm?path=...&filename=...
rename?path=...&fromfilename=...&tofilename=...
svnadd?path=...&filename=...&filename=...
svncommit?path=...&filename=...&filename=...[&logmsg=...]
or
svncommit?path=...&commitall=yes[&logmsg=...]
getfile?path=...&filename=...
putfile?path=...&filename=...&data=...

ls and getfile are referentially transparent. rm, rename, svnadd, svncommit
and putfile cause changes to happen on the server.

All operations but getfile return a JSON document which is an object
containing a full directory listing for the path given.

Getfile returns the file contents precisely.

svnadd and svncommit can take 0 or more filename arguments. If given 0, they
just perform an ls. svncommit can alternatively be given "commitall=yes",
which will commit all files in the directory.

Adds and commits are recursive.