Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.upstream.folderNeedsUpstream
on folderNeedsUpstream (folder) {
<<Changes
<<1/29/02; 1:57:50 PM by JES
<<Set adrfile^.upstream.whenLastUploaded to date (0), instead of adrfile^.modified. Fixes a bug where files would not be re-upstreamed after an upstream spec is changed. Also, clear file and folder upstream URLs.
<<12/8/01; 5:42:39 PM by DW
<<Created. The caller is saying that all the files contained within the folder need to be upstreamed, usually because its #upstream.xml file changed.
<<Loop over the folders recursively, but skip folders that have their own #upstream.xml.
on dofolder (folder) {
local (f, adrfolder);
radio.file.getFileAttributes (folder, @adrfolder);
adrfolder^.upstream.url = "";
fileloop (f in folder) {
if file.isfolder (f) {
if not file.exists (f + radio.data.fileNames.upstreamFileName) { //hands-off folders with their own #upstream.xml
dofolder (f)}}
else {
if file.isvisible (f) {
if not (file.filefrompath (f) beginswith "#") {
local (adrfile);
radio.file.getFileAttributes (f, @adrfile);
adrfile^.upstream.whenLastUploaded = date (0);
adrfile^.upstream.url = ""}}}}};
dofolder (folder)};
bundle { //test code
folderNeedsUpstream (user.radio.prefs.wwwfolder + "test_www" + file.getPathChar ())}
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.