Coda Distributed File System
copyfile.h
Go to the documentation of this file.
1/* BLURB lgpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2018 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU Library General Public Licence Version 2, as
11shown in the file LICENSE. The technical and financial contributors to
12Coda are listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef _COPYFILE_H_
20#define _COPYFILE_H_
21
22/*
23 * functions for copying files around
24 */
25
26#include <errno.h>
27#include <fcntl.h>
28#include <sys/types.h>
29#include <sys/stat.h>
30#include <unistd.h>
31#include <stdint.h>
32
33#define BUF_SIZE 8192 /* size of buffer for looping copy */
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
49int copyfile_seg(int infd, int outfd, uint64_t pos, int64_t count);
50
59int copyfile(int fromfd, int tofd);
60
69int copyfile_byname(const char *fromname, const char *toname);
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* _COPYFILE_H_ */
int copyfile_byname(const char *fromname, const char *toname)
Definition: copyfile.c:77
int copyfile_seg(int infd, int outfd, uint64_t pos, int64_t count)
Definition: copyfile.c:29
int copyfile(int fromfd, int tofd)
Definition: copyfile.c:60