On 8/21/06, Fred Moyer <[EMAIL PROTECTED]> wrote:
Greetings,
I've hacked a method I needed into Qpsmtpd::Transaction called
body_front_write(), which writes to the front of the message body. I drew
heavily from body_write(), but couldn't find a way to avoid making a copy of
the body in order to write to the front of it. I was wondering if anyone knew
of a cleaner way to do this,
Some file systems have been designed that allow insertion of data in the middle,
but they are not supported by portable libraries, so the feature is
not widely used.
At the front is a degenerate case of in the middle.
An alternate way to write at the beginning of something, which is
certainly more complex
and probably not worth the effort, is to store the thing as a list of
things and join them
when you are done with them. To do it that way would require
refactoring all body code
to use an array rather than a scalar, but you could then unshift the
new piece on the front
instead of copying the body buffer.
I think you must be dealing with very large message bodies in order to care.