| 37 | } |
| 38 | |
| 39 | static bool copy_files(const char* to_path) |
| 40 | { |
| 41 | const char* files[] = { |
| 42 | "gson.cpp", |
| 43 | "gson.h", |
| 44 | NULL, |
| 45 | }; |
| 46 | |
| 47 | acl::string buf, filepath; |
| 48 | |
| 49 | for (size_t i = 0; files[i] != NULL; i++) |
| 50 | { |
| 51 | buf.basename(files[i]); |
| 52 | filepath.format("%s/%s", to_path, buf.c_str()); |
| 53 | |
| 54 | if (copy_file(files[i], filepath) == false) |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | return true; |
| 59 | } |
| 60 | |
| 61 | static void scan_path(std::vector<std::string>& files) |
| 62 | { |