Append content to a file. */
| 71 | |
| 72 | /* Append content to a file. */ |
| 73 | static inline int th_append_file(const char *path, const char *content) { |
| 74 | FILE *f = cbm_fopen(path, "ab"); |
| 75 | if (!f) { |
| 76 | return -1; |
| 77 | } |
| 78 | if (content && content[0]) { |
| 79 | fputs(content, f); |
| 80 | } |
| 81 | fclose(f); |
| 82 | return 0; |
| 83 | } |
| 84 | |
| 85 | /* ── Directory creation ───────────────────────────────────────── */ |
| 86 |
no test coverage detected