Commit 2ba3bb84 authored by Jim Fulton's avatar Jim Fulton

Noted that storeBlob and consumeFile take ownership of the file passed

in and that the file must not be open.
parent b7b094ec
############################################################################## ##############################################################################
# #
# Copyright (c) 2004 Zope Corporation and Contributors. # Copyright (c) Zope Corporation and Contributors.
# All Rights Reserved. # All Rights Reserved.
# #
# This software is subject to the provisions of the Zope Public License, # This software is subject to the provisions of the Zope Public License,
...@@ -801,7 +801,8 @@ class IStorageTransactionInformation(Interface): ...@@ -801,7 +801,8 @@ class IStorageTransactionInformation(Interface):
status = Attribute("Transaction Status") # XXX what are valid values? status = Attribute("Transaction Status") # XXX what are valid values?
user = Attribute("Transaction user") user = Attribute("Transaction user")
description = Attribute("Transaction Description") description = Attribute("Transaction Description")
extension = Attribute("A dictionary carrying the transaction's extension data") extension = Attribute(
"A dictionary carrying the transaction's extension data")
def __iter__(): def __iter__():
"""Iterate over the transaction's records given as """Iterate over the transaction's records given as
...@@ -974,6 +975,10 @@ class IBlob(Interface): ...@@ -974,6 +975,10 @@ class IBlob(Interface):
The blob must not be opened for reading or writing when consuming a The blob must not be opened for reading or writing when consuming a
file. file.
The blob will take over ownership of the file and will either
rename or copy and remove it. The file must not be open.
""" """
...@@ -981,7 +986,14 @@ class IBlobStorage(Interface): ...@@ -981,7 +986,14 @@ class IBlobStorage(Interface):
"""A storage supporting BLOBs.""" """A storage supporting BLOBs."""
def storeBlob(oid, oldserial, data, blobfilename, version, transaction): def storeBlob(oid, oldserial, data, blobfilename, version, transaction):
"""Stores data that has a BLOB attached.""" """Stores data that has a BLOB attached.
The blobfilename argument names a file containing blob data.
The storage will take ownership of the file and will rename it
(or copy and remove it) immediately, or at transaction-commit
time. The file must not be open.
"""
def loadBlob(oid, serial): def loadBlob(oid, serial):
"""Return the filename of the Blob data for this OID and serial. """Return the filename of the Blob data for this OID and serial.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment