HEX
Server: Apache/2
System: Linux nexus-01 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User: aglcoke (1118)
PHP: 8.2.31
Disabled: mail,exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/include/dovecot/iostream-temp.h
#ifndef IOSTREAM_TEMP_H
#define IOSTREAM_TEMP_H

enum iostream_temp_flags {
	/* if o_stream_send_istream() is called with a readable fd, don't
	   actually copy the input stream, just have iostream_temp_finish()
	   return a new iostream pointing to the fd dup()ed */
	IOSTREAM_TEMP_FLAG_TRY_FD_DUP	= 0x01
};

/* Start writing to given output stream. The data is initially written to
   memory, and later to a temporary file that is immediately unlinked. */
struct ostream *iostream_temp_create(const char *temp_path_prefix,
				     enum iostream_temp_flags flags);
struct ostream *iostream_temp_create_named(const char *temp_path_prefix,
					   enum iostream_temp_flags flags,
					   const char *name);
struct ostream *iostream_temp_create_sized(const char *temp_path_prefix,
					   enum iostream_temp_flags flags,
					   const char *name,
					   size_t max_mem_size);
/* Finished writing to stream. Return input stream for it and free the
   output stream. (It's also possible to abort iostream-temp by simply
   destroying the ostream.) */
struct istream *iostream_temp_finish(struct ostream **output,
				     size_t max_buffer_size);

/* For internal testing: */
void o_stream_temp_set_writev(struct ostream *output,
			      ssize_t (*func)(int fd, const struct iovec *iov,
					      unsigned int iov_count));

#endif