title: How do I exclude `.` and `..` from a directory listing
body: <p>I am reading the current directory and printing it out using </p>
  
  <pre><code>printf("%s\n", file-&gt;d_name);
  </code></pre>
  
  <p>but it also prints out "." and ".." files. How can I exclude them?</p>