samer@0: function locator=dbtmp(x) samer@0: % dbtmp - Save object to matbase under tmp subtree samer@0: % samer@0: % dbtmp :: A -> action locator(A). samer@0: samer@0: dt=clock; samer@0: root=dbroot; samer@0: dir='tmp'; samer@0: if ~exist(fullfile(root,dir),'dir') samer@0: [rc,msg]=mkdir(root,dir); samer@0: % if rc==0, error(msg); end samer@0: end samer@0: samer@0: fn=uniquefile(dt,root,dir,'m%s'); % make up a filename samer@0: save(fullfile(root,[fn '.mat']),'fn','x'); samer@0: locator=[fn '|x']; samer@0: