MCPcopy Create free account
hub / github.com/alibaba/GraphScope / parse_codegen_dir

Function parse_codegen_dir

flex/bin/interactive_server.cc:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace gs {
35
36std::string parse_codegen_dir(const bpo::variables_map& vm) {
37 std::string codegen_dir;
38
39 if (vm.count("codegen-dir") == 0) {
40 LOG(INFO) << "codegen-dir is not specified";
41 codegen_dir = server::CodegenProxy::DEFAULT_CODEGEN_DIR;
42 } else {
43 codegen_dir = vm["codegen-dir"].as<std::string>();
44 }
45 // clear codegen dir
46 if (std::filesystem::exists(codegen_dir)) {
47 LOG(INFO) << "codegen dir exists, clear directory";
48 std::filesystem::remove_all(codegen_dir);
49 } else {
50 // create codegen_dir
51 LOG(INFO) << "codegen dir not exists, create directory";
52 std::filesystem::create_directory(codegen_dir);
53 }
54 return codegen_dir;
55}
56
57void blockSignal(int sig) {
58 sigset_t set;

Callers 1

init_codegen_proxyFunction · 0.85

Calls 2

existsFunction · 0.85
countMethod · 0.65

Tested by

no test coverage detected