File-system representation interfaces
The interfaces defined here are used for file-system and file-system-like representations of objects, such as file-system synchronization, FTP, PUT, and WebDAV.
There are three issues we need to deal with:
File system representation
Every object is either a directory or a file.
There are two kinds of properties:
Data properties are handled directly by the object implementation.
Meta data properties are handled via annotations.
We must have a complete lossless data representation for file-system synchronization. This is achieved through serialization of:
All annotations (not just properties), and
Strategies for common access mechanisms:
For getting directory info (static) information:
Use Zope DublinCore to get modification times
Show as readable if we can access a read method.
Show as writable if we can access a write method.
FTP and WebDAV
Treat as a directory if there is an adapter to
IReadDirectory. Treat as a file otherwise.
For creating objects:
Look for an
First look for a
IFileFactoryadapter with a name that is the same as the extention (e.g. “.pt”).
Then look for an unnamed
Because this must be lossless, we will use class-based adapters for this, but we want to make it as easy as possible to use other adapters as well.
For reading, there must be a class adapter to
IReadSync. We will then apply rules similar to those above.