cctools
copy_stream.h
1/*
2Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3Copyright (C) 2022 The University of Notre Dame
4This software is distributed under the GNU General Public License.
5See the file COPYING for details.
6*/
7
8#ifndef COPY_STREAM_H
9#define COPY_STREAM_H
10
11#include <stdint.h>
12#include <stdio.h>
13#include <stdlib.h>
14
15int64_t copy_fd_to_fd(int in, int out);
16int64_t copy_fd_to_stream(int fd, FILE *output);
17
18int64_t copy_file_to_file(const char *input, const char *output);
19int64_t copy_file_to_buffer(const char *path, char **buffer, size_t *len);
20
21int64_t copy_stream_to_buffer(FILE *input, char **buffer, size_t *len);
22int64_t copy_stream_to_fd(FILE *input, int fd);
23int64_t copy_stream_to_stream(FILE *input, FILE *output);
24
25#endif
Definition buffer.h:26