On Fri, Jun 6, 2008 at 5:28 PM, Steve Fink &lt;<a href="mailto:sphink@gmail.com">sphink@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Also... what are you doing it for? There are a number of legitimate<br>
uses, but it&#39;s also a common race condition -- just because something<br>
is readable at the moment you checked doesn&#39;t mean that it&#39;ll still be<br>
readable when you try to read it. So if you really depend on it being<br>
correct, then you&#39;ll have to just try to do the operation and check<br>
failure then.<br>
<div><div></div><div class="Wj3C7c"></div></div></blockquote><div><br>I was just testing because a following operation blows up badly if the file isn&#39;t readable, and doesn&#39;t give useful error messages (specifically, GD&#39;s new PNG from file call).&nbsp; So I add this test so that I can post my own error and not try the GD call.<br>
<br>I did end up adding an &#39;open&#39; call to see if I can actually read it. <br></div></div><br>-- <br>Dan Boger