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

system.verbs.builtins.fileSynch.deleteFile

on deleteFile (adrfile) {
	<<Changes
		<<7/8/06; 11:35:59 AM by DW
			<<Created.
	local (adrdata);
	adrdata = parentof (adrfile^); //files
	adrdata = parentof (adrdata^); //the synchpoint table
	if defined (adrdata^.callbacks.deleteFile) {
		try {
			adrdata^.callbacks.deleteFile^ (adrdata, adrfile);
			system.temp.fileSynch.trash.[nameof (adrfile^)] = adrfile^;
			adrdata^.stats.lastDeletedFile = nameof (adrfile^);
			adrdata^.stats.ctdeletes++;
			delete (adrfile)}
		else {
			adrfile^.cterrors++;
			adrfile^.whenLastError = clock.now ();
			adrfile^.lastError = tryError}}};
bundle { //test code
	deleteFile (@user.fileSynch.synchPoints.test.files.["oh.opml"])}



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.