At 1:12 PM +0000 12/15/04, Jeff Zucker wrote:
Unfortunately, I don't see any way to do that. Some DBM implementations have different file naming conventions. For AnyData and CSV, files can be named anything. Even if we could recognize the names of the files we wouldn't necessarily know which DBM type created the file so there'd be no way to know if a connection would succeed without trying many different combinations of dbm_type, mldbm_type, etc. Basically, if the user keeps only files of a specified type in specified directories, then data_sources() and tables() will be useful, otherwise not. I don't see a way around it.

How much trouble would it be to actually look inside each file? I know that this is what must be done for the 'SQLite' database, since the files can be named anything. Is there any reason to not try each [*dbm_type] on each candidate directory, trap errors, and return appropriately mapped ones that work? As I said, data_sources() wouldn't be called too often so this speed hit should be acceptable; it's better that the results actually are valid, I think. -- Darren Duncan

Reply via email to