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

system.verbs.builtins.radio.utilities.systemFolderTextFiles.saveChangedFiles

<<Changes
	<<11/2/01; 8:44:32 PM by JES
		<<Only check mod-date on objects in the database if the object exists.
	<<10/20/01; 5:01:12 PM by JES
		<<Created. Reads only changed text files from the www/system/ sub-folder into the odb at radio.data.systemFolderTextFiles.
		<<This is a utility for UserLand people to use when releasing changes to system folder text files.
local (adrtable = @radio.data.systemFolderTextFiles);
local (systemfolder = user.radio.prefs.wwwfolder + radio.data.folderNames.wwwSystemSubfolderName + file.getpathchar ());
local (f);
fileloop (f in systemfolder, infinity) {
	local (objectname = string.delete (f, 1, sizeof (systemfolder)));
	objectname = string.replaceall (objectname, file.getpathchar (), "/");
	if not (objectname beginswith radio.data.folderNames.wwwUpstreamSubfolderName) {
		if not (objectname beginswith "temp/") {
			if radio.webserver.getfilemimetype (f) beginswith "text" {
				local (adrobject = @radio.data.systemFolderTextFiles.[objectname]);
				local (flSaveFile = false);
				if defined (adrobject^) {
					if timeModified (adrobject) != file.modified (f) {
						flSaveFile = true}}
				else { //new file
					flSaveFile = true};
				if flSaveFile {
					msg ("Reading \"" + f + "\"...");
					wp.newtextobject (string (file.readwholefile (f)), adrobject);
					setTimeCreated (adrobject, file.created (f));
					setTimeModified (adrobject, file.modified (f))}}}}};
msg ("");
filemenu.save ()



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.