Scandir Own filter function
<p>I must write  2 functions, filter - names > 5 chars  and I must sort them by types.</p>

<p>Filtr function should look like this ?</p>

<pre><code>int (* filter) (const struct dirent* entry) {

    if ( (strlen(entry&gt;d_name) - 1 ) &gt; 5 ) {
        return entry;
    }
}
</code></pre>

<p>How about sort, in dirent its dirent->d_type, but how to sort ?</p>