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

system.verbs.builtins.table.inGuestDatabase

on inGuestDatabase (adr) {
	<<Does the address point to an object inside an existing guest database?
		<<Tue, Sep 29, 1998 at 4:52:15 PM by PBS
	<<Changes
		<<12/3/01; 5:50:30 PM by JES
			<<If running on Carbon, don't require the guest database to have Mac type/creator codes. (This is the same behavior as on Windows.)
	
	local (addressList = string.parseAddress (adr));
	local (f = addressList [1]);
	
	if file.exists (f) {
		if system.environment.isMac {
			if file.type (f) == 'TABL' and file.creator (f) == 'LAND' {
				return (true)}};
		if system.environment.isWindows or system.environment.isCarbon {
			if string.lower (f) endsWith ".root" {
				return (true)}}};
	
	return (false)}



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.