[Zope3-dev] Re: Object Status Info

Shane Hathaway shane@zope.com
Tue, 9 Apr 2002 22:59:02 -0400 (EDT)


On Tue, 9 Apr 2002, Stephan Richter wrote:

> Hello everyone,
>
> for FTP support I need to know some information about objects. I need:
>
> - the access mode a la Unix (can be probably found after security is done)
> - Owner and owner group of the object (I assume that will also come from
> the security mechanism somehow)
> - Size of object (right now it checks whether a method getSize exists)
> - Access, Modification and Creation time. I think that information should
> be stored in the container of the object.
>
> I thought about extending the folder to at least store the dates; maybe
> even the owner and the size should be stored here as well.
>
> What do you think?

I think adapters are the key.  Adapt objects to IFileAccessMode,
IOwnership, IGroupOwnership, IObjectSize, and IFileTimes.  (Those names
might not be right, but they are a start.)  Perhaps there might even be an
"IUnix_ls" view that looks up those adapters, supplying a default when
there is no adapter found.

One thing to keep in mind is that although most FTP clients ask for
extended listings, they don't actually do anything with most of the
information besides show it to the user.  The size is probably the only
field (besides the name) that influences the behavior of the client.

Shane