Initial commit
This is working repository now. I had to clean this up due to my f_ups, that made this simple repo around 200MB large. Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode@xyz>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#ifndef FILE_UTILS_H
|
||||
#define FILE_UTILS_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "commons.h"
|
||||
|
||||
#define MAX_PATH_LENGTH (4096U)
|
||||
|
||||
/**
|
||||
* @brief Reads file and puts its content into char buffer. If NULL is provided as buffer, than just bytes_count
|
||||
* is set
|
||||
*
|
||||
* @param file_path Path to file
|
||||
* @param bytes_count Returned bytes count
|
||||
* @param buffer Returned filled buffer
|
||||
*/
|
||||
rse_err_t file_read(const char* file_path, size_t* bytes_count, char* buffer);
|
||||
|
||||
rse_err_t file_write(const char* file_name, size_t bytes_count, char* buffer);
|
||||
|
||||
rse_err_t file_load_pixels(const char* file_name, unsigned char* buffer, size_t* buffer_size, int* width, int* height);
|
||||
|
||||
rse_err_t file_append_full_path(char* file_path, size_t max_buffer_size);
|
||||
|
||||
#endif /* FILE_UTILS_H */
|
||||
|
||||
Reference in New Issue
Block a user