Monday, November 08, 2010 at 12:00 AM.

river2Suite.loadFromFolder

on loadFromFolder (fname) {
	<<Changes
		<<6/20/09; 5:00:41 AM by DW
			<<Load a file from the "river2" sub-folder of the OPML folder.
	local (adrdata = river2suite.init (), f = adrdata^.prefs.folder + fname, fmod = file.modified (f));
	local (adrcache = @system.temp.river2.cssCache, flread = true);
	if not defined (adrcache^) {
		new (tabletype, adrcache)};
	adrcache = @adrcache^.[fname];
	if defined (adrcache^) {
		if fmod <= adrcache^.whenModified {
			flread = false}};
	if flread {
		new (tabletype, adrcache);
		adrcache^.text = string (file.readwholefile (f));
		adrcache^.whenModified = fmod;
		adrcache^.count = 1}
	else {
		adrcache^.count++};
	return (adrcache^.text)};
bundle { //test code
	loadFromFolder ("river.css")}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.