Lines Matching refs:src

50 static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, unsigned int options…
98 static void printCopyMsg(const char* src, const char* dst, unsigned int options) in printCopyMsg() argument
101 printf(" '%s' --> '%s'\n", src, dst); in printCopyMsg()
104 static void printNotNewerMsg(const char* src, const char* dst, unsigned int options) in printNotNewerMsg() argument
106 (void)src; in printNotNewerMsg()
116 static int copyFileContents(const char* dst, int dstFd, const char* src, int srcFd) in copyFileContents() argument
128 "acp: failed reading '%s': %s\n", src, strerror(errno)); in copyFileContents()
209 static int copyRegular(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int … in copyRegular() argument
214 DBUG(("--- copying regular '%s' to '%s'\n", src, dst)); in copyRegular()
230 src, dst); in copyRegular()
235 DBUG(("--- source is not newer: '%s'\n", src)); in copyRegular()
236 printNotNewerMsg(src, dst, options); in copyRegular()
243 srcFd = open(src, O_RDONLY | O_BINARY, 0); in copyRegular()
245 fprintf(stderr, "acp: unable to open '%s': %s\n", src, strerror(errno)); in copyRegular()
291 copyResult = copyFileContents(dst, dstFd, src, srcFd); in copyRegular()
305 srcRsrcName = malloc(strlen(src) + 5 + 1); in copyRegular()
306 strcpy(srcRsrcName, src); in copyRegular()
340 printCopyMsg(src, dst, options); in copyRegular()
355 extern int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int …
362 static int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int … in copySymlink() argument
369 DBUG(("--- copying symlink '%s' to '%s'\n", src, dst)); in copySymlink()
386 src, dst); in copySymlink()
391 DBUG(("--- source is not newer: '%s'\n", src)); in copySymlink()
392 printNotNewerMsg(src, dst, options); in copySymlink()
399 nameLen = readlink(src, linkBuf, sizeof(linkBuf)-1); in copySymlink()
402 src, strerror(errno)); in copySymlink()
432 printCopyMsg(src, dst, options); in copySymlink()
442 int copyDirectory(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int optio… in copyDirectory() argument
449 DBUG(("--- copy dir '%s' to '%s'\n", src, dst)); in copyDirectory()
465 src, dst); in copyDirectory()
478 printCopyMsg(src, dst, options); in copyDirectory()
484 dir = opendir(src); in copyDirectory()
487 src, strerror(errno)); in copyDirectory()
508 srcLen = strlen(src); in copyDirectory()
512 memcpy(srcFile, src, srcLen); in copyDirectory()
541 static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, unsigned int options) in copyFileRecursive() argument
555 statResult = lstat(src, &srcStat); in copyFileRecursive()
557 statResult = stat(src, &srcStat); in copyFileRecursive()
562 fprintf(stderr, "acp: file '%s' does not exist\n", src); in copyFileRecursive()
565 src, strerror(statErrno)); in copyFileRecursive()
578 fprintf(stderr, "acp: omitting directory '%s'\n", src); in copyFileRecursive()
580 retVal = copyDirectory(src, dst, &srcStat, options); in copyFileRecursive()
584 retVal = copySymlink(src, dst, &srcStat, options); in copyFileRecursive()
587 retVal = copyRegular(src, dst, &srcStat, options); in copyFileRecursive()
590 src, srcStat.st_mode); in copyFileRecursive()
601 int copyFile(const char* src, const char* dst, unsigned int options) in copyFile() argument
603 return copyFileRecursive(src, dst, true, options); in copyFile()