Monday, November 08, 2010 at 12:04 AM.
system.verbs.builtins.radio.backup.backupTemplates
on backupTemplates (adrStatusMsgCallback=nil) {
<<Changes
<<1/23/03; 6:53:06 PM by JES
<<New optional parameter, adrStatusMsgCallback -- called with the name of the file currently being backed up.
<<1/15/03; 12:58:45 PM by JES
<<Rewrite: Save templates in their own folder as plain text files instead of in a single .fttb file.
<<11/13/02; 4:41:49 PM by DW
<<Created. Load all top-level files in the www folder whose names begin with a pound sign.
local (pc = file.getPathChar ());
local (destfolder = user.radio.backup.prefs.folder + "templates" + pc);
file.sureFilePath (destfolder + "x");
local (f, fname);
fileloop (f in user.radio.prefs.wwwfolder) {
fname = file.filefrompath (f);
if fname beginswith "#" {
if adrStatusMsgCallback != nil {
try {adrStatusMsgCallback^ (fname + "...")}};
file.copy (f, destfolder + string.popLeading (fname, '#'))}}};
bundle { //test code
backupTemplates ()}
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.