23 lines
587 B
C
23 lines
587 B
C
#ifndef FILE_UTILS_H
|
|
#define FILE_UTILS_H
|
|
|
|
#include <stddef.h>
|
|
#include "utilities/commons.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);
|
|
|
|
rse_err_t get_curr_path(char* path, size_t max_path_length);
|
|
|
|
#endif /* FILE_UTILS_H */
|
|
|