Re: is anyone using return_folders in tools.Walk()?

"Will Guaraldi" <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
On 7/5/07, Ryan Barrett <pyblosxom-6sb6M7qyT/[email protected]> wrote:
> hi all! is anyone using the optional return_folders parameter in the
> tools.Walk() function? i'm considering a non-backward compatible change. i
> found a couple uses on the web, beloq, and i've cc'ed their authors. i figured
> i'd check here too.

Personally, I think Walk is a wart.  I'd like to remove it and replace
it with a get_entries and a get_categories or something along those
lines.  There's a note at the very bottom of the TODO regarding this
work.


> return_folders defaults to false, which returns only files. if it's set to
> true, only directories are returned. i'm planning to extend it so that both
> files and directories can be returned. that's possible now by calling Walk
> twice, but that stats all of the directories and folders twice, which is
> inefficient. if you don't use a filestat cache, it can be noticeable on large
> sites.

Are you sure about that?  I didn't think the stat'ing was done in
tools.Walk.  Walk will walk the directory tree twice, but I don't see
it stat'ing things.

/will

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.