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