<div dir="ltr"><div><div>I created a file zblah.txt and did ln -s zblah.txt zblahblah<br><br></div>this is what I get after deleting zblah.txt<br><br>1> file:read_file_info("zblahblah").<br>{error,enoent}<br>2> file:read_link_info("zblahblah").<br>
{ok,{file_info,9,symlink,none,<br>               {{2013,4,15},{9,46,0}},<br>               {{2013,4,15},{9,45,59}},<br>               {{2013,4,15},{9,45,59}},<br>               41471,1,2053,0,5505639,1000,1000}}<br><br><br>
<br></div>wes<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 15, 2013 at 7:19 AM, Jeff Schultz <span dir="ltr"><<a href="mailto:jeffschultz@lavabit.com" target="_blank">jeffschultz@lavabit.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 15/04/2013 20:28, Joe Armstrong wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I tried this on ubuntu as well:<br>
<br>
test() -><br>
     File = "/home/ejoearm/work/bugs/<u></u>share",<br>
     {ok, X1} = file:read_file_info(File),<br>
     {ok, X2} = file:read_link_info(File),<br>
     {X1#file_info.type, X2#file_info.type}.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
bug:test().<br>
</blockquote>
{directory,symlink}<br>
<br>
So read_file_info does follow symlinks. But the man page says it can return<br>
type<br>
symlink. Is this a bug in the manual page? Or have I misunderstood<br>
something.<br>
</blockquote>
<br></div>
Just a guess, but it may return symlink if the symlink's target doesn't exist, and the target's type otherwise.<br>
<br>
If so, that's probably worth pointing out in the documentation.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
    Jeff Schultz</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>