[Checkins] SVN: zope.file/trunk/src/zope/file/ merged ajung-blobs branch providing a file implementation supporting

Fred Drake fdrake at gmail.com
Tue Feb 27 10:51:41 EST 2007


On 2/27/07, Andreas Jung <lists at zopyx.com> wrote:
> Ups, I wasn't aware that this code is used for production since I had the
> impression that your code was just a preparation for a blob based
> implementation (since there is a file implementation in Z3). I copied the
> original code to a branch but I can also revert the changes. What do you
> suggest?

The API was intended to be "blob friendly" (though it's not security
declaration friendly!), and I don't object to using blobs for new
instances or switching to blobs when modifying existing instances.

I suspect the most reasonable approach is to test
isinstance(self._data, str); it's self._data is a string, wrap it in a
StringIO for read-access, and replace it with a blob for write-access.
 The size property is affected as well (and I'd like the size to
continue to be cached on the instance, since that's used by the ISized
adapter commonly used for folder listings).


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
"Every sin is the result of a collaboration." --Lucius Annaeus Seneca


More information about the Checkins mailing list