returns true if swd directory can be written to $Id$
0001 function tf = swd_writable(D) 0002 % returns true if swd directory can be written to 0003 % 0004 % $Id$ 0005 0006 tf = 0; 0007 Swd = swd(D); 0008 if isempty(Swd), return, end 0009 0010 test_file = fullfile(Swd, 'write_test.txt'); 0011 try 0012 save(test_file, 'test_file'); 0013 tf = 1; 0014 end 0015 if tf, delete(test_file); end