MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / write_file

Function write_file

lite/tools/rc4_encrypt.cpp:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void write_file(std::string file_path, const std::vector<uint8_t>& data) {
29 FILE* fin = fopen(file_path.c_str(), "wb");
30 if (!fin) {
31 printf("failed to open %s.", file_path.c_str());
32 };
33 fwrite(data.data(), 1, data.size(), fin);
34 fclose(fin);
35}
36
37typedef int (*CommandHandler)(int, char**);
38

Callers 5

command_encrypt_rc4Function · 0.85
command_encrypt_sfrc4Function · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected