File: deletemeshfile.m

package info (click to toggle)
octave-iso2mesh 1.9.8%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,128 kB
  • sloc: cpp: 11,982; ansic: 10,158; sh: 365; makefile: 59
file content (29 lines) | stat: -rw-r--r-- 976 bytes parent folder | download
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