anvil.server.file.FileRealm
| property |
default |
description |
dir |
(required) |
Indicates the directory containing the realm information.
This directory must contain file index
which describes the structure of realm.
For each citizen and tribe there is also a
<id>.data file in same directory containing
the serialized namespace.
|
copyonget |
false |
Controls if the variables should be (deep) copied when
fetched from tribes or citizens.
|
copyonset |
false |
Controls if the value being assigned should be (deep) copied when
storing to tribes or citizens.
|
maxmodifications |
1 |
Controls the maximum number of modification allowed before the
realm is automatically stored to disk.
If this number is greater than one, then the save operation
is also accomplished using
anvil.net.Tribe.commit()
and
anvil.net.Citizen.commit().
|
Example of index file:
tribe: 1, "MyShop"
Creates a tribe named "MyShop" with id 1.
tribe: 2, "Admins"
Creates a tribe named "Admins" with id 2.
citizen: 3, "root", "bassvord"
Creates a citizen "root" with password "bassword" and id 3.
citizen: 4, "test", "test"
Creates a citizen "test" with password "test" and id 4.
map: 1, 2
Attaches group 2 ("Admins") into group 1 ("MyShop"),
i.e. "Admins" will be "MyShop"'s child.
On map lines, left argument must always point to tribe.
map: 1, 4
Attaches user 4 ("test") into group 1 ("MyShop");
map: 2, 3
Attaches user 3 ("root") into group 1 ("Admins");
root: 1
Sets the root tribe of realm.
When this command is issued the tribe should already be created.
Summary of commands:
- tribe: id, name
- citizen: id, name, password
- map: parent-tribe, child-tribe-or-citizen
- root: root-tribe
Command arguments must be escaped with double quotes,
in case they contain spaces or commas (,).
Optionally arguments may be delimited with plain spaces, instead
of commas.
|