File listing shows attributes in some folders but not in others
<p>I'm having trouble trying to get attributes from files in my list. The code is:</p>

<pre><code>if ($this-&gt;dir = opendir($caminho))
{
    $this-&gt;itens = array();
    $this-&gt;itensTotal = 0;
    $tipos = array("dir" =&gt; 0, "file" =&gt; 1);

    while ($item = readdir($this-&gt;dir))
    {
        if (!in_array($item, $this-&gt;skip))
        {
            $t = filetype($item);
            $this-&gt;itens[$tipos[$t] . $item] = array("nome" =&gt; $item,
                                                     "size" =&gt; filesize($item),
                                                     "tipo" =&gt; $t,
                                                     "perm" =&gt; fileperms($item));

            $this-&gt;itensTotal++;
        }
    }
}
</code></pre>

<p>Seeing that my script is 'file.php' and is in the folder 'www'. When it reads it's own folder (www) it works ok and lists all files and directoryies with their attributes. But when it tryies to read eg.: <em>/www/folder/</em> the function <code>filetype()</code>, <code>filesize()</code> an <code>fileperms()</code> doesn't works! I get these warnings for all itens in the directory:</p>

<blockquote>
  <p>Warning: filetype() [function.filetype]: Lstat failed for bkp in
  D:\UniformServer\UniServer\www\files.php on line 174</p>
  
  <p>Warning: filesize() [function.filesize]: stat failed for bkp in
  D:\UniformServer\UniServer\www\files.php on line 176</p>
  
  <p>Warning: fileperms() [function.fileperms]: stat failed for bkp in
  D:\UniformServer\UniServer\www\files.php on line 178</p>
</blockquote>

<p>It's opens the folder, read it's contents but these functions doesn't woks =s</p>

<p>Notes:</p>

<ul>
<li>As you can see I'm running it on Windows</li>
<li><code>$caminho</code> has valids paths</li>
</ul>

<p>Please, any help will be welcome cause google doesn't helped.</p>
