I figured out the problem.

It seems that spm_existfile only returns that a file exists if it exists AND the file can be read, so it returns 0 if the read permissions are incorrect.

exist says that a file exists whether or not it can be read.

-----
Darren Gitelman


On Tue, May 5, 2009 at 5:41 PM, Darren Gitelman <[log in to unmask]> wrote:
Hi

spm_existfile fails to find a file with the following name /usr/local/4dfp/z_ROI/L_V1_-7.2_-82.5_-1.9.4dfp.img

however, using exist('/usr/local/4dfp/z_ROI/L_V1_-7.2_-82.5_-1.9.4dfp.img')

or exist('/usr/local/4dfp/z_ROI/L_V1_-7.2_-82.5_-1.9.4dfp.img','file')

correctly finds the file.

-----
Darren Gitelman