[Zope] Re: LocalFS w/ annotation data

Jonothan Farr jfarr@real.com
Mon, 19 Jun 2000 15:31:16 -0700


> BTW: I'm working on associating other annotation data with LocalFS
> files.  My current thinking is to release the result as a separate
> product, since I can't think of a way to do it that doesn't hack
> LocalFS sources.  Basically, I'm adding a PersistentMapping (from id
> to arbitrary class) to LocalFS that can contain one entry for every
> item in the top level directory with items for lower level directories
> being PersistentMappings themselves.  This seems less of a pain that
> one mapping with the key being the full relative pathname when the
> time comes to handle rename, add and delete...
>
> The motivation for all of this is an archive of PDF files.  I don't
> want to fill up the ZODB with the PDF files, but am perfectly happy to
> keep contributor name, short description, etc. there.  We'll use a
> ZClass to store this info, but I don't think that anything but our
> DTML will need to be aware of the details of it.
>
> Comments?


That sounds like a mess. LocalDirectory objects are not persistent, they are
created each time they are requested. So you'll have nowhere to put your
PersistentMappings except in the top-level LocalFS object. Trying to make the
LocalDirectories persistent would be painful. For one, it would be hard to keep
in synch with the file system. You could store everything in a PM at the top and
use paths relative to the base but that would make copy,rename,etc. also messy,
like you said.

What about just storing your meta-data in files in the local file system? Then
you wouldn't need to modify the LocalFS product at all. Just write a ZClass that
can read/write you meta-data file format.

--jfarr