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()
337 printCopyMsg(src, dst, options); in copyRegular()
352 extern int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int …
354 static int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int … in copySymlink() argument
361 DBUG(("--- copying symlink '%s' to '%s'\n", src, dst)); in copySymlink()
378 src, dst); in copySymlink()
383 DBUG(("--- source is not newer: '%s'\n", src)); in copySymlink()
384 printNotNewerMsg(src, dst, options); in copySymlink()
391 nameLen = readlink(src, linkBuf, sizeof(linkBuf)-1); in copySymlink()
394 src, strerror(errno)); in copySymlink()
424 printCopyMsg(src, dst, options); in copySymlink()
434 int copyDirectory(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int optio… in copyDirectory() argument
441 DBUG(("--- copy dir '%s' to '%s'\n", src, dst)); in copyDirectory()
457 src, dst); in copyDirectory()
470 printCopyMsg(src, dst, options); in copyDirectory()
476 dir = opendir(src); in copyDirectory()
479 src, strerror(errno)); in copyDirectory()
500 srcLen = strlen(src); in copyDirectory()
504 memcpy(srcFile, src, srcLen); in copyDirectory()
533 static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, unsigned int options) in copyFileRecursive() argument
547 statResult = lstat(src, &srcStat); in copyFileRecursive()
549 statResult = stat(src, &srcStat); in copyFileRecursive()
554 fprintf(stderr, "acp: file '%s' does not exist\n", src); in copyFileRecursive()
557 src, strerror(statErrno)); in copyFileRecursive()
570 fprintf(stderr, "acp: omitting directory '%s'\n", src); in copyFileRecursive()
572 retVal = copyDirectory(src, dst, &srcStat, options); in copyFileRecursive()
575 retVal = copySymlink(src, dst, &srcStat, options); in copyFileRecursive()
577 retVal = copyRegular(src, dst, &srcStat, options); in copyFileRecursive()
580 src, srcStat.st_mode); in copyFileRecursive()
591 int copyFile(const char* src, const char* dst, unsigned int options) in copyFile() argument
593 return copyFileRecursive(src, dst, true, options); in copyFile()