MCPcopy Create free account
hub / github.com/BaseXdb/basex / write

Method write

basex-core/src/main/java/org/basex/core/users/Users.java:93–108  ·  view source on GitHub ↗

Writes permissions to disk.

()

Source from the content-addressed store, hash-verified

91 * Writes permissions to disk.
92 */
93 public synchronized void write() {
94 try {
95 file.parent().md();
96 final FBuilder root = FElem.build(Q_USERS);
97 for(final User user : users.values()) {
98 root.node(user.toXml(null, null));
99 }
100 if(info != null) {
101 root.node(info);
102 info.parent(null);
103 }
104 file.write(root.finish().serialize(SerializerMode.INDENT.get()).finish());
105 } catch(final IOException | QueryException ex) {
106 Util.errln(ex);
107 }
108 }
109
110 /**
111 * Creates an initial admin password and writes it to the logs.

Callers 5

initMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95

Calls 11

buildMethod · 0.95
nodeMethod · 0.95
finishMethod · 0.95
errlnMethod · 0.95
mdMethod · 0.80
getMethod · 0.65
parentMethod · 0.45
valuesMethod · 0.45
toXmlMethod · 0.45
finishMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected