Mercurial > hg > plml
view matlab/db/dbdrop.m @ 14:e1f87438e34c
Work around for lock-up when used by triserver project. By god it's ugly but it seems to work.
author | samer |
---|---|
date | Thu, 02 Feb 2012 03:01:20 +0000 |
parents | 0dd31a8c66bd |
children |
line wrap: on
line source
function dbdrop(loc) % dbdrop - delete matfile at given locator from matbase % % dbdrop :: locator(A) -> action unit. % % The files containing the specified locators are deleted from % the file system. If the file pointed to by the locator does % not exist, a warning is given but the function completes. % SA 2008-06 - No longer maps over multiple arguments. n=strfind(loc,'|'); if n>1, matname=loc(1:n-1); else matname=loc; end fn=fullfile(dbroot,[matname '.mat']); if exist(fn,'file') fprintf('*** DELETING FILE: %s\n', fn); delete(fn); else fprintf('*** Warning: %s does not exist\n', fn); end