Re: something like grep



Hi,

You can use the opendir and readdir functions to traverse a directory
tree. There's an example in the doc at php.net/opendir.

If you want to do a text search within a directory tree, you can use
the egrep shell command with the -r (recursive) option on most
linuxes.

Regards,

John Peters

On Jul 29, 4:47 pm, Jeff <jeff@xxxxxxxxxxxxxxx> wrote:
I'd like to open a directory and spider all the subdirectories and files.

What is the php term for doing this?

Seems like it should be here:

http://us3.php.net/manual/en/ref.filesystem.php

Perhaps I'm just having a bad day!

Jeff

.



Relevant Pages

  • Re: opendir
    ... an errno from opendir "No such file or directory" while my program is ... working its way thru a tree. ... you need to allocate space for it) although I don't know whether ...
    (comp.lang.c)
  • Re: opendir
    ... LINUX. ... an errno from opendir "No such file or directory" while my program is ... working its way thru a tree. ...
    (comp.lang.c)
  • Re: Walk DOM Tree in Reverse?
    ... algorithm will traverse all nodes (sadly not necessarily visiting each ... the right child of the current root (plus at the beginning of the ... var fakeParent =!elem.parentNode; ... tree may be passed in. ...
    (comp.lang.javascript)
  • Re: Depth First Search traversal of this list
    ... I am trying to traverse the list C)) in a way that the ... works by iterating over the items at one level in the tree. ... are deferred into a queue, which is processed after the atoms are visited. ... After collecting both the queue and current level items, we do the recursion to ...
    (comp.lang.lisp)
  • Re: Walk DOM Tree in Reverse?
    ... I think of .lastChild as a rightmost child ... algorithm will traverse all nodes (sadly not necessarily visiting each ... node is the root of a tree containing all the nodes. ...
    (comp.lang.javascript)