httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: file attribute questions
Date Mon, 20 Aug 2001 05:34:37 GMT
From: "Paul Bayley" <>
Sent: Monday, August 20, 2001 12:08 AM

> Hey,
> Last time I posted here it was suggested that I look into extending the definition of
apr_finfo_t to include some
filesystem-specific file attributes. Basically localize Apache 2.x for Darwin. I have a couple
questions before I try this.
> * Should I modify srclib/apr/include/apr_file_info.h?

That will break binary compatibility.  Fine today, horrible tommorow.

I think we need an extension schema that won't keep breaking.  Care to propose one :-?

If you wanted to add stuff that -many- systems support, I don't know that anybody would
object (physical size in storage [which maps to the '.size' if unknown], etc.)  Let's finish
defining those today, and agree to relagate all future growth into the extension schema.

If we are adding the content/language stuff, I suggest that goes in the extensible
mechansim.  Simply add an APR_FINFO_EXTRA bit if there might be something more to ask.

> * What is the difference between mtime and ctime? Also, would anybody have any use for
creation date (as opposed to modification
date)? I don't think anything outside the mac world uses creation dates.

modified versus created (I think that answers your question.)  And yes, Win32 NTFS
and some other systems have ctime.  So does unix.

> Once I know which attributes I need to fill out, I can get them using one call of getattrlist().
Those attributes a file system
can't fulfill will be null.

Essentially, if you can grab them on your first apr_file_info_get or apr_stat call,
then do so, but stash them in the more info pointer.  It can be an abstract (void*)
member of the structure.  Allocate it on the pool.

Win32 can't get more info without extra system calls, which we wouldn't do up front.
We would write the same accessor for the extension stuff, only it must perform
the system calls when the user calls that accessor.

I guess you will just dig into that allocation and return a pointer to whatever
interests the user.

> Question: How does Apache write files? What if somebody uploads a file via webdav or
something, and I wish to set the correct
attributes. Is that even possible? (I don't know what information web browsers will send when
uploading a file. I fear the worst in
that they will only send the file name)

mod_dav_fs extended the 'vanilla' DAV protocol to the file system.  If they upload
by something other than webdav, I'm afraid it's that module/cgi author's job to
deal with it.

If we get mod_dav_fs right, it will be a fine example for the rest of those authors :)


View raw message