MCPcopy Create free account
hub / github.com/acl-dev/acl / open_tpl

Method open_tpl

app/wizard/file_tmpl.cpp:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25tpl_t* file_tmpl::open_tpl(const char* filename)
26{
27 tpl_t* tpl = tpl_alloc();
28 string filepath;
29 filepath.format("%s/%s", path_from_.c_str(), filename);
30 if (tpl_load(tpl, filepath.c_str()) != TPL_OK) {
31 printf("load file %s error: %s\r\n",
32 filepath.c_str(), last_serror());
33 tpl_free(tpl);
34 return NULL;
35 }
36 return tpl;
37}
38
39bool file_tmpl::copy_and_replace(const char* from,
40 const char* to, bool exec /* = false */)

Callers 1

create_http_servletFunction · 0.80

Calls 6

tpl_allocFunction · 0.70
tpl_loadFunction · 0.70
tpl_freeFunction · 0.70
last_serrorFunction · 0.50
formatMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected