title: How to check if a symbolic link refers to a directory
body: <p>I am currently recoding the "ls" command to learn. However, when I browse files: I may have an error when I try to open the "folder" of the path pointed by the symbolic link. Because it's not a directory (I thought all symbolic links pointed to folders).</p>
  
  <p>How can I check if it points to a directory? (I watch the manuals, stat, dir ..)</p>