samer@0: function dbdrop(loc) samer@0: % dbdrop - delete matfile at given locator from matbase samer@0: % samer@0: % dbdrop :: locator(A) -> action unit. samer@0: % samer@0: % The files containing the specified locators are deleted from samer@0: % the file system. If the file pointed to by the locator does samer@0: % not exist, a warning is given but the function completes. samer@0: samer@0: % SA 2008-06 - No longer maps over multiple arguments. samer@0: samer@0: n=strfind(loc,'|'); samer@0: if n>1, matname=loc(1:n-1); else matname=loc; end samer@0: fn=fullfile(dbroot,[matname '.mat']); samer@0: samer@0: if exist(fn,'file') samer@0: fprintf('*** DELETING FILE: %s\n', fn); samer@0: delete(fn); samer@0: else samer@0: fprintf('*** Warning: %s does not exist\n', fn); samer@0: end samer@0: