Coda Distributed File System
Macros | Functions
copyfile.c File Reference
#include "copyfile.h"
Include dependency graph for copyfile.c:

Macros

#define O_BINARY   0
 

Functions

int copyfile_seg (int infd, int outfd, uint64_t pos, int64_t count)
 
int copyfile (int infd, int outfd)
 
int copyfile_byname (const char *in, const char *out)
 

Macro Definition Documentation

◆ O_BINARY

#define O_BINARY   0

Function Documentation

◆ copyfile()

int copyfile ( int  fromfd,
int  tofd 
)

Copy a file to another file

Parameters
fromfdfile descriptor of the source file
tofdfile descriptor of the destination file
Returns
-1 on errors and 0 otherwise

◆ copyfile_byname()

int copyfile_byname ( const char *  fromname,
const char *  toname 
)

Copy a file to another file

Parameters
fromnamefile path of the source file
tonamefile path of the destination file
Returns
-1 on errors and 0 otherwise

◆ copyfile_seg()

int copyfile_seg ( int  infd,
int  outfd,
uint64_t  pos,
int64_t  count 
)

Copy a segment of a file to another file

Parameters
infdfile descriptor of the source file
outfdfile descriptor of the destination file
posoffset within the source file
countamount of bytes to be copied
Returns
-1 on errors and 0 otherwise