savePresentationFile(args.urldecoding, _wiki.getURLDecodingVersion(), PresentationFileType.URLDecoding);
//TODO: Move this to Wiki class.
// Save the wiki pages to WIKI page path.
assert(_wiki.wiki() != null);
DatabaseContent wikiContent = _wiki.wiki().content();
File wikiDirFile = new File(args.wikiDir);
// Ensure directory for wiki pages exists
if(!wikiDirFile.exists()) {
System.err.println("Creating wiki directory " + args.wikiDir);
wikiDirFile.mkdir();
}
if(wikiDirFile.isDirectory()) {
for(int i = 0; i < wikiContent.size(); i++) {
WikiPageDescription wikiEntry = (WikiPageDescription)wikiContent.get(i);
File wikiFile = new File(args.wikiDir+ File.separator + "page_" + i +".xml" );
OutputStream wikioutstream = new FileOutputStream(wikiFile);
OutputStreamWriter wikiout = new OutputStreamWriter(wikioutstream);