Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.upstream.builtinDrivers.xmlStorageSystem.upstreamMultipleFiles
on upstreamMultipleFiles (fileslist, adrspec, adrresponse) {
<<Changes
<<12/9/01; 7:09:56 PM by DW
<<Created.
<<fileslist is a list of adrfile's, addresses of tables in user.radio.settings.files.
<<adrspec specifies an xmlStorageSystem server.
with adrspec^ {
local (password = string (user.radio.prefs.passwords.[passwordName]));
local (relativepathlist = {}, filetextlist = {}, filepathlist = {});
bundle { //fill relativepathlist, filetextlist
local (adrfile);
for adrfile in fileslist {
local (f = nameof (adrfile^));
local (relativePath = adrfile^.relativePath);
filetextlist = filetextlist + {radio.upstream.getUpstreamText (f, @relativePath)};
relativepathlist = relativepathlist + {relativePath};
filepathlist = filepathlist + {f}}};
msg ("Upstreaming " + sizeof (filetextlist) + " files to " + adrspec^.server + "...");
local (flerror, message, urllist);
local (data = adrspec^); data.fldebug = false;
xmlStorageSystem.writeMultipleFiles (usernum, password, relativepathlist, filetextlist, adrresponse, adrdata:@data, flShowMessages:false);
urllist = adrresponse^.urllist;
bundle { //record info about the files
local (adrfile, ct = 1);
for adrfile in fileslist {
if urllist [ct] == "" { //this is how cloud indicates an error
adrfile^.upstream.flError = true}
else { //no error, increment ctUploads, set url, set flError to false
adrfile^.upstream.ctUploads++;
adrfile^.upstream.url = urllist [ct];
adrfile^.upstream.flError = false};
ct++}};
msg ("")}};
bundle { //test code
upstreamMultipleFiles (scratchpad.streams [1].files, scratchpad.streams [1].adrspec, @scratchpad.response)}
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.