On 3/7/07, Christian Theune <[EMAIL PROTECTED]> wrote:
I propose to create a small subclass to override the `make_file` method
to use `NamedTemporaryFile` instead of `TemporaryFile` to allow the file
being accessible from a filename so I can apply a `link` operation.

Notice: The FieldStorage explicitly provides the `make_file` method to
allow overriding in this sense.

Since you're proposing to replace TemporaryFile anyway, and your
'os.link()' proposal requires that both the file and the hard link are
on the same 'drive' or 'partition' or whatever, why not create the
temporary file on a temp directory that is close (hopefully a sibling)
of the final destination blob directory, then you can be sure that
'os.link()' will work and will be 'O(1)' without any extra effort.

Is there any reason not to do that?

--
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to