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

Method TransformPath

app/jencode/Gb2Utf8.cpp:39–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool CGb2Utf8::TransformPath(const char *path_from, const char *path_to)
40{
41 acl::scan_dir scan;
42 if (!scan.open(path_from)) {
43 CString msg;
44 msg.Format("Open src path %s error", path_from);
45 MessageBox(NULL, msg, "Open path", 0);
46 return false;
47 }
48
49 const char* pFile;
50 while ((pFile = scan.next_file(true)) != NULL) {
51 acl::string path(pFile);
52 if (path.end_with("resource.h", false)) {
53 logger(">>skip file: %s", pFile);
54 } else if (path.end_with(".c") || path.end_with(".h") ||
55 path.end_with(".cpp") || path.end_with(".cxx") ||
56 path.end_with(".hpp") || path.end_with(".hxx") ||
57 path.end_with(".java") || path.end_with(".txt") ||
58 path.end_with(".php") || path.end_with(".html") ||
59 path.end_with(".js") || path.end_with(".css") ||
60 path.end_with(".d") || path.end_with(".py") ||
61 path.end_with(".perl") || path.end_with(".cs") ||
62 path.end_with(".as") || path.end_with(".go") ||
63 path.end_with(".rust") || path.end_with(".erl")) {
64
65 TransformFile(pFile, pFile);
66 } else {
67 logger(">>skip file: %s", pFile);
68 }
69 }
70 return true;
71}
72
73bool CGb2Utf8::TransformFile(const char *pFrom, const char *pTo)
74{

Callers

nothing calls this directly

Calls 3

next_fileMethod · 0.80
end_withMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected