There are many problems with the way the current version is provided and maintained. This commit or series of commits will fix this.
20 lines
494 B
C
20 lines
494 B
C
#ifndef FILE_UTILS_H
|
|
#define FILE_UTILS_H
|
|
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* @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
|
|
*/
|
|
void read_file(const char* file_path, size_t* bytes_count, char* buffer);
|
|
|
|
void write_to_file(const char* file_name, size_t bytes_count, char* buffer);
|
|
|
|
#endif /* FILE_UTILS_H */
|
|
|