Monday, November 08, 2010 at 12:04 AM.

system.verbs.builtins.radio.backup.readDirectory

on readDirectory (xmltext, adrtable) {
	<<Changes
		<<11/16/02; 12:27:46 PM by DW
			<<Created.
	new (tabletype, adrtable);
	xml.compile (xmltext, @xstruct);
	<<scratchpad.xstruct = xstruct
	local (adrfiles = xml.getAddress (@xstruct, "files"), adr);
	for adr in adrfiles {
		if nameof (adr^) contains "file" {
			local (adrfile = @adrtable^.[adr^.["/atts"].path]);
			new (tabletype, adrfile);
			adrfile^.size = number (adr^.["/atts"].size);
			adrfile^.created = date (adr^.["/atts"].created);
			adrfile^.modified = date (adr^.["/atts"].modified)}}};
bundle { //test code
	local (f = user.radio.backup.prefs.folder + "files.xml");
	readDirectory (string (file.readwholefile (f)), @scratchpad.directory)}



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.