copy_stream.h
00001
00002
00003
00004
00005
00006
00007
00008 #ifndef COPY_STREAM_H
00009 #define COPY_STREAM_H
00010
00011 #include <stdint.h>
00012 #include <stdio.h>
00013 #include <stdlib.h>
00014
00015 int64_t copy_fd_to_fd(int in, int out);
00016 int64_t copy_fd_to_stream(int fd, FILE *output);
00017
00018 int64_t copy_file_to_file(const char *input, const char *output);
00019 int64_t copy_file_to_buffer(const char *path, char **buffer, size_t *len);
00020
00021 int64_t copy_stream_to_buffer(FILE *input, char **buffer, size_t *len);
00022 int64_t copy_stream_to_fd(FILE *input, int fd);
00023 int64_t copy_stream_to_stream(FILE *input, FILE *output);
00024
00025 #endif