$darkmode
Enumerations | |
| enum | { DEFAULT_MAX_FILE_SIZE = 16 * 1024 * 1024 } |
Functions | |
| char * | io_read_file (const char *path, size_t max_size, size_t *out_size) |
| Reads an entire file into a null-terminated string. More... | |
| char* io_read_file | ( | const char * | path, |
| size_t | max_size, | ||
| size_t * | out_size | ||
| ) |
Reads an entire file into a null-terminated string.
Performs security checks to prevent path traversal and applies size limits. The returned buffer must be freed by the caller.
| path | The path to the file to read. |
| max_size | Maximum allowed file size (0 for default MAX_SHADER_SOURCE_SIZE). |
| out_size | Optional pointer to store the actual file size. |