Re: DirectoryIterator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 26, 2010 at 2:05 PM, Christoph Boget <cboget@xxxxxxxxxxx> wrote:

> I executed the following test script several times.  Each time, in a
> separate terminal window, I ran "touch bob.txt" after the script started
> echoing out.  After the script completed, I deleted bob.txt.  During each
> execution, not once did bob.txt show up in the output.  This makes me
> believe that the file collection that DirectoryIterator is going to work
> with is set at instantiation.  If that's the case, it makes little sense to
> me that you are unable to get the size of that collection from the
> DirectoryInterator object.
>
> <?php
>  $dirList = new DirectoryIterator(MY_DIR);
>  foreach($dirList as $file )
>  {
>    echo $file->getFilename() . '<br>';
>    flush();
>    sleep( 1 );
>  }
> ?>
>

in that case you would likely need to expose something extra from the C
layer.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux