/* * $Id: spm_unlink.c 4872 2012-08-30 15:29:15Z guillaume $ * John Ashburner */ /* Do a silent deletion of files on disk */ #include #include #include "mex.h" void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { int i; if (nlhs != 0) mexErrMsgTxt("Too many output arguments."); for(i=0; i=0;k--) if (str[k] == ' ') str[k] = '\0'; else break; remove(str); /* not bothered about return status */ mxFree(str); } else mexErrMsgTxt("Filename should be a string."); } }