apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: New directory API...
Date Mon, 22 Jan 2001 05:31:39 GMT
On Sun, Jan 21, 2001 at 06:56:52PM -0800, rbb@covalent.net wrote:
> 
> Will Rowe and I were talking earlier today, and our directory API is
> horribly broken and inefficient.  Basically, on Unix if you want to get
> any information about a file in a directory, we have to do a stat for each
> piece of information.
> 
> For example, if you want the size, that's one stat.  If you then want the
> file type, that's another stat.  Yuck!

Ugly... yup.

> Here is a design that Will suggested earlier today, implemented for
> Unix.  Basically, it just uses the finfo structure to store information
> about the file when you read it from the directory.

This isn't using finfo at all. It only returns the file name. The caller is
then supposed to go back and use apr_stat for the other data.

If we're just going to return the name, then let's do that. Returning an
finfo is a misnomer.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message