21 #ifndef PADDLE_MODEL_PROTECT_IO_UTILS_H 22 #define PADDLE_MODEL_PROTECT_IO_UTILS_H 26 int read_file(
const char* file_path,
unsigned char** dataptr,
size_t* sizeptr);
28 int read_with_pos_and_length(
const char* file_path,
unsigned char* dataptr,
29 size_t pos,
size_t length);
31 int read_with_pos(
const char* file_path,
size_t pos,
unsigned char** dataptr,
34 int write_file(
const char* file_path,
const unsigned char* dataptr,
37 int append_file(
const char* file_path,
const unsigned char* data,
size_t len);
39 size_t read_file_size(
const char* file_path);
41 int read_file_to_file(
const char* src_path,
const char* dst_path);
43 int dir_exist_or_mkdir(
const char* dir);
48 int read_dir_files(
const char* dir_path,
49 std::vector<std::string>& files);
53 #endif // PADDLE_MODEL_PROTECT_IO_UTILS_H All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16