Tuesday, August 18, 2009 at 7:32 PM.

newsRiverSuite.podcatcher.makeSpaceOnDisk

local (adrdata = newsRiverSuite.init ());
if adrdata^.newsRiver.podcatcher.prefs.flReclaimBytes {
	local (ctbytes = newsRiverSuite.podcatcher.howMuchSpaceUsed ());
	if ctbytes > adrdata^.prefs.ctBytesForEnclosures { //we're going to delete some stuff!
		local (f, sorttable);
		new (tabletype, @sorttable);
		fileloop (f in adrdata^.prefs.folder, infinity) {
			sorttable.[f] = file.created (f)};
		local (oldtarget = target.set (@sorttable));
		table.sortby ("Value");
		target.set (oldtarget);
		<<scratchpad.sorttable = sorttable
		while ctbytes > adrdata^.prefs.ctBytesForEnclosures {
			local (f = nameof (sorttable [1]));
			delete (@sorttable [1]);
			ctbytes = ctbytes - file.size (f);
			file.delete (f);
			if sizeof (sorttable) < 1 {
				break}}}}



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.