So can I
reload a root.xml in a fresh SmallWiki-Image? I didn't find
the semantics in the Methods. I think of something like:
sw := SWKom startOn: 8080 host: 'localhost' ip: '127.0.0.1'.
sw storage: (SWSIXXStorage new delay: 60 * 60).
sw storage restoreFromDefaultXmlFile.
sw start.
I am not sure about this, because I've stopped using SIXX due to lack of
speed with this persistence mechanism. But for porting from image to
image this should be no problem, so my guess how to do this is the
following:
sw := SWKom startOn: 8080 host: 'localhost' ip: '127.0.0.1'.
sw storage: (SWSIXXStorage new delay: 60 * 60).
sw storage
readStreamFrom: aFilename
do: [ :stream | sw root: stream next ].
Thanks, this is a good solution:
sw := SWKom startOn: 8080 host: 'localhost' ip: '127.0.0.1'.
sw storage: (SWSIXXStorage new delay: 60*60).
(sw storage directory fileExists: 'root.xml') ifTrue:
[ sw storage
readStreamFrom: filename
do: [ :stream | sw root: stream next ].
].
sw start.
Cheers
Chris Burkert
--