Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.theme.create.textFiles
on textFiles (adrTheme, folder=user.radio.prefs.wwwFolder) { <<Changes <<2/23/02; 8:00:33 PM by JES <<Don't save #prefs files in the Theme. Since #prefs files are in user-space and may contain information specific to this user, they should not be included with the Theme. A corresponding change in radio.theme.apply.textFiles prevents #prefs files from being overwritten by Themes which were created before this change was made. <<1/1/02; 10:39:15 PM by JES <<Skip folders and invisible files. <<12/30/01; 5:29:00 PM by JES <<Read in all of the template files, and #prefs from a folder, and load them into the Theme table at adrTheme. local (adrFiles = @adrTheme^.textFiles); new (tableType, adrFiles); fileloop (f in folder) { local (fname = file.fileFromPath (f)); if not file.isFolder (f) { if file.isVisible (f) { if fname beginsWith "#" { if string.lower (fname) != radio.data.fileNames.upstreamFileName { if not (string.lower (fname) beginsWith "#prefs.") { if not (string.lower (fname) beginsWith "#navigatorlinks.") { local (adrfile = @adrFiles^.[fname]); local (filetext = file.readWholeFile (f)); wp.newTextObject (file.readWholeFile (f), adrfile); setTimeCreated (adrfile, file.created (f)); setTimeModified (adrfile, file.modified (f))}}}}}}}; return (true)}
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.