samer@0: % *** db :: functions for dealing with MAT file database samer@0: % samer@0: % The Prolog-Matlab interface module plml requires these functions samer@0: % to manage a database of MAT files and a few other tasks. The MAT samer@0: % file database (matbase) is stored in the file system under a root samer@0: % directory specified by a call to dbroot, eg to specify the samer@0: % directory lib/matbase off your home directory on a host named samer@0: % 'godzilla' (the host name must be supplied to allow for multiple samer@0: % hosts to use the same root directory): samer@0: % samer@0: % dbroot('~/lib/matbase','godzilla'); samer@0: % samer@0: % From this point, any calls to dbsave will result in files being samer@0: % created under ~/lib/matbase/godzilla. MAT files in the matbase samer@0: % are referred to using a locator, which is a string of the form samer@0: % samer@0: % //| samer@0: % samer@0: % This refers to a Matlab variable named in a MAT file samer@0: % whos path is constructed using the matbase root, the host name, samer@0: % and the component of the locator. Eg, after the above samer@0: % dbroot statement, the locator samer@0: % samer@0: % 'godzilla/d0608/m34521|x' samer@0: % samer@0: % refers to the MAT file ~/lib/matbase/godzilla/d0608/m34521.mat samer@0: % NOTE: this is probably not going to work for Windows users due samer@0: % to silly slash vs backslash file separator issues. samer@0: % The functions in this directory are: samer@0: % samer@0: % dbdrop - delete matfile at given locator from matbase samer@0: % dbload - Load value from given matbase locator samer@0: % dbpath - Return full path of matfile given locator samer@0: % dbread - Load values from ASCII file under matbase tree samer@0: % dbroot - Set or retrieve Matbase root directory samer@0: % dbsave - Save object to MatBase using given name samer@0: % dbsaveas - Save object to MatBase using given name samer@0: % dbtmp - Save object to matbase under tmp subtree samer@0: % typecode - Return basic typing information about a value samer@0: % uniquefile - Allocate a unique unused filename samer@0: % uniquevar - Allocate a unique unused variable name samer@0: