
Functions | |
| VOLK_rc | mkdir_p (const char *path, mode_t mode) |
| Make recursive directories. | |
| VOLK_rc | rm_r (const char *path) |
| Remove a directory recursively, as in Unix "rm -r". | |
| char * | strdup (const char *src) |
| Replacement for GNU strdup. | |
| char * | strndup (const char *src, size_t max) |
| Replacement for GNU strndup. | |
| int | utf8_encode (const uint32_t utf, unsigned char *out) |
| Encode a code point using UTF-8. | |
| VOLK_rc mkdir_p | ( | const char * | path, |
| mode_t | mode ) |
Make recursive directories.
Modified from https://gist.github.com/JonathonReinhart/8c0d90191c38af2dcadb102c4e202950
| VOLK_rc rm_r | ( | const char * | path | ) |
Remove a directory recursively, as in Unix "rm -r".
| [in] | path | Path of directory to remove. |
Remove a directory recursively, as in Unix "rm -r".
Adapted from https://stackoverflow.com/questions/5467725/how-to-delete-a-directory-and-its-contents-in-posix-c/42596507#42596507
| char * strdup | ( | const char * | src | ) |
| char * strndup | ( | const char * | src, |
| size_t | max ) |
Replacement for GNU strndup.
param[in] src String to duplicate. param[in] max Max number of characters to duplicate. The length is capped to the smaller value between this and the source string length (characters up to the trailing \0).
return Duplicated string. The caller is in charge of freeing it after use.
|
inline |
Encode a code point using UTF-8.
https://gist.github.com/MightyPork/52eda3e5677b4b03524e40c9f0ab1da5
| out | - output buffer (min 5 characters), will be 0-terminated |
| utf | - code point 0-0x10FFFF |