Monday, November 08, 2010 at 12:04 AM.
system.verbs.builtins.radio.backup.backupStories
on backupStories () {
<<Changes
<<11/26/02; 1:54:57 PM by JES
<<Skip invisible files or files whose names begin with a '.' character.
<<11/13/02; 5:41:37 PM by DW
<<Created.
local (pc = file.getpathchar (), foldername = radio.data.folderNames.wwwStoriesSubFolderName);
local (storiesfolder = user.radio.prefs.wwwfolder + foldername + pc, fsource);
local (destfolder = user.radio.backup.prefs.folder + foldername + pc, fdest);
file.surefolder (destfolder);
on callback (f) {
<<msg (f)
if not file.isVisible (f) {
return (false)};
if file.fileFromPath (f) beginsWith "." {
return (false)};
return (true)};
file.reconcilefolder (storiesfolder, destfolder, @callback);
bundle { //delete the Extra Files folder if it exists
local (extrafilesfolder = destfolder + "Extra Files" + pc);
if file.exists (extrafilesfolder) {
file.deletefolder (extrafilesfolder)}}};
bundle { //test code
backupStories ()}
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.