Lines Matching defs:target

874 	FSDomain *targetDomain, const char *target, const Options &options,
878 get_file_domain(const char *target, const char *&fsTarget)
880 if (target[0] == ':') {
881 fsTarget = target + 1;
884 fsTarget = target;
895 copy_file_contents(const char *source, File *sourceFile, const char *target,
904 printf("%s ", strrchr(target, '/') ? strrchr(target, '/') + 1 : target);
918 target, fssh_strerror(bytesWritten));
923 target);
944 Directory *sourceDir, FSDomain *targetDomain, const char *target,
963 // compose a new target path name
964 char *targetEntry = make_path(target, entry->d_name);
966 fprintf(stderr, "Error: Failed to allocate target path!\n");
988 copy_attribute(const char *source, Node *sourceNode, const char *target,
1000 "`%s': %s\n", name, target, fssh_strerror(bytesWritten));
1021 // write data to target
1026 "`%s': %s\n", name, target, fssh_strerror(bytesWritten));
1039 copy_attributes(const char *source, Node *sourceNode, const char *target,
1055 error = copy_attribute(source, sourceNode, target, targetNode, name,
1073 FSDomain *targetDomain, const char *target, const Options &options,
1092 // check, if target exists
1095 error = targetDomain->Open(target, FSSH_O_RDONLY | FSSH_O_NOTRAVERSE,
1099 // 1. target exists:
1103 // if the target is a symlink, try resolving it
1106 error = targetDomain->Open(target, FSSH_O_RDONLY,
1115 // 1.1. target and source are dirs:
1119 // 1.2. source and/or target are no dirs
1123 // -> remove the target and continue with 2.
1126 error = targetDomain->Unlink(target);
1128 fprintf(stderr, "Error: Failed to remove `%s'\n", target);
1132 // 1.2.1.1. !/force/, but both source and target are files
1133 // -> truncate the target file and continue
1136 error = targetDomain->Open(target, FSSH_O_RDWR | FSSH_O_TRUNC,
1140 target);
1144 // 1.2.1.2. !/force/, source or target isn't a file
1146 fprintf(stderr, "Error: File `%s' does exist.\n", target);
1150 } // else: 2. target doesn't exist: -> just create it
1152 // create the target node
1157 error = targetDomain->CreateFile(target, sourceNode->Stat(), file);
1170 // create the target only, if it doesn't already exist
1173 error = targetDomain->CreateDirectory(target, sourceNode->Stat(),
1192 // create the target link
1194 error = targetDomain->CreateSymLink(target, linkTo,
1206 fprintf(stderr, "Error: Failed to create `%s': %s\n", target,
1213 error = copy_attributes(source, sourceNode, target, targetNode);
1220 error = copy_file_contents(source, sourceNode->ToFile(), target,
1224 sourceNode->ToDirectory(), targetDomain, target, options);
1315 // check the target
1316 const char *target = sources[--sourceCount];
1319 FSDomain *targetDomain = get_file_domain(target, target);
1323 fssh_status_t error = targetDomain->Open(target, FSSH_O_RDONLY, targetNode);
1329 // That's how it should be; we don't care whether the target is
1337 target);
1343 fprintf(stderr, "Error: Failed to open target `%s' (it must exist "
1344 "in attributes only mode): `%s'\n", target,
1349 " `%s'\n", target, fssh_strerror(error));
1362 // open the target node for attributes only mode
1365 error = targetDomain->Open(target, FSSH_O_RDONLY, targetNode);
1367 fprintf(stderr, "Error: Failed to open target `%s' for writing: "
1368 "`%s'\n", target, fssh_strerror(error));
1395 error = copy_attributes(source, sourceNode, target, targetNode);
1398 // 1. target exists:
1399 // 1.1. target is a dir:
1436 targetDomain, target, options);
1440 // (copy_entry(<source>, <target>/<source leaf>))
1441 // compose a new target path name
1442 char *targetEntry = make_path(target, leafName);
1444 fprintf(stderr, "Error: Failed to allocate target path!\n");
1453 // 1.2. target is no dir:
1454 // -> if /force/ is given, we replace the target, otherwise
1456 // (copy_entry(<source>, <target>))
1458 // 2. target doesn't exist:
1459 // -> we create the target as a clone of the source
1460 // (copy_entry(<source>, <target>))
1461 error = copy_entry(sourceDomain, source, targetDomain, target,