Re: [PHP] DirectoryIterator

2010-08-02 Thread Nathan Nobbe
2010/8/2 João Cândido de Souza Neto > Is there a way of getting the symbolic link's target when using > DirectoryIterator? > as DirectoryIterator traverses the contents of a directory, the current() method will return an SplFileInfo instance. Using the SplFileInfo, you can determine if the entr

Re: [PHP] DirectoryIterator

2010-01-26 Thread Paul M Foster
On Tue, Jan 26, 2010 at 10:01:12PM +0100, Kim Madsen wrote: > Christoph Boget wrote on 26/01/2010 21:17: >> I've looked through the docs but was unable to find out if this is > possible; >> I hope it is. Is there a way that you get the size/length of the > collection >> to be iterated (e.g. the t

Re: [PHP] DirectoryIterator

2010-01-26 Thread Nathan Nobbe
On Tue, Jan 26, 2010 at 2:06 PM, Nathan Nobbe wrote: > On Tue, Jan 26, 2010 at 2:05 PM, Christoph Boget 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 com

Re: [PHP] DirectoryIterator

2010-01-26 Thread Nathan Nobbe
On Tue, Jan 26, 2010 at 2:01 PM, Kim Madsen wrote: > Christoph Boget wrote on 26/01/2010 21:17: > > I've looked through the docs but was unable to find out if this is >> possible; >> I hope it is. Is there a way that you get the size/length of the >> collection >> to be iterated (e.g. the total

Re: [PHP] DirectoryIterator

2010-01-26 Thread Nathan Nobbe
On Tue, Jan 26, 2010 at 2:05 PM, Christoph Boget 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 on

Re: [PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
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

Re: [PHP] DirectoryIterator

2010-01-26 Thread Kim Madsen
Christoph Boget wrote on 26/01/2010 21:17: I've looked through the docs but was unable to find out if this is possible; I hope it is. Is there a way that you get the size/length of the collection to be iterated (e.g. the total number of files) without having to iterate through at least once? O

Re: [PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
> > right but the collection is built during iteration. > So you're saying that if I add a file to the directory between the time I instantiate the DirectoryIterator and the time I'm finished iterating through, that file could be picked up? Or is the instance only going to contain a list of files

Re: [PHP] DirectoryIterator

2010-01-26 Thread Nathan Nobbe
On Tue, Jan 26, 2010 at 1:25 PM, Christoph Boget wrote: > > > > def not on DirectorIterator afaik, and furthermore, i dont think thats > > supported at the shell / filesystem level even. > > > Well if the Iterator has the whole of the collection in order to be able to > iterate over it, I would t

Re: [PHP] DirectoryIterator

2010-01-26 Thread Ashley Sheridan
On Tue, 2010-01-26 at 15:25 -0500, Christoph Boget wrote: > > > > def not on DirectorIterator afaik, and furthermore, i dont think thats > > supported at the shell / filesystem level even. > > > Well if the Iterator has the whole of the collection in order to be able to > iterate over it, I woul

Re: [PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
> > def not on DirectorIterator afaik, and furthermore, i dont think thats > supported at the shell / filesystem level even. Well if the Iterator has the whole of the collection in order to be able to iterate over it, I would think that it should be able to return the size of that collection... :

Re: [PHP] DirectoryIterator

2010-01-26 Thread Nathan Nobbe
On Tue, Jan 26, 2010 at 1:17 PM, Christoph Boget wrote: > I've looked through the docs but was unable to find out if this is > possible; > I hope it is. Is there a way that you get the size/length of the > collection > to be iterated (e.g. the total number of files) without having to iterate > t

[PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
I've looked through the docs but was unable to find out if this is possible; I hope it is. Is there a way that you get the size/length of the collection to be iterated (e.g. the total number of files) without having to iterate through at least once? thnx, Christoph

[PHP] DirectoryIterator

2004-07-22 Thread Jason Barnett
Hey guys, I'm getting some unexpected results when trying to use ArrayIterator - but since it's undocumented this might be correct. When I use a DirectoryIterator to traverse a directory I can't seem to create an array containing all of the directory elements. I've tried using references as we