-
Notifications
You must be signed in to change notification settings - Fork 73
/
deletemeshfile.m
29 lines (28 loc) · 976 Bytes
/
deletemeshfile.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function flag = deletemeshfile(fname)
%
% flag=deletemeshfile(fname)
%
% delete a given work mesh file under the working directory
%
% author: Qianqian Fang, <q.fang at neu.edu>
%
% input:
% fname: specified file name (without path)
%
% output:
% flag: not used
%
% -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
%
try
if (~isempty(dir(fname)))
delete(fname);
end
catch
error(['You do not have permission to delete temporary files. If you are working in a multi-user ', ...
'environment, such as Unix/Linux and there are other users using iso2mesh, ', ...
'you may need to define ISO2MESH_SESSION=''yourstring'' to make your output ', ...
'files different from others; if you do not have permission to ', mwpath(''), ...
' as the temporary directory, you have to define ISO2MESH_TEMP=''/path/you/have/write/permission'' ', ...
'in matlab/octave base workspace.']);
end