MCPcopy Create free account
hub / github.com/acl-dev/acl / files_copy

Function files_copy

app/wizard/file_copy.cpp:43–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43bool files_copy(const char* name, const FILE_FROM_TO* tab,
44 const char* from_path, const char* to_path)
45{
46 string from, to;
47
48 from = "tmpl/Makefile.in";
49 to.format("%s/Makefile.in", to_path);
50 if (file_copy(from.c_str(), to.c_str()) == false)
51 return false;
52
53 for (size_t i = 0; tab[i].from != NULL; i++)
54 {
55 from.format("%s/%s", from_path, tab[i].from);
56 to.format("%s/%s", to_path, tab[i].to);
57 if (file_copy(from, to) == false)
58 {
59 printf("create %s failed!\r\n", name);
60 return false;
61 }
62 }
63
64 printf("create %s ok!\r\n", name);
65 return true;
66}

Callers 1

create_commonMethod · 0.85

Calls 3

file_copyFunction · 0.85
formatMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…