MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / createDirectory

Function createDirectory

eval/LANE_evaluation/lane2d/src/evaluate.cpp:81–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79void read_lane_file(const string &file_name, vector<vector<Point2f>> &lanes, vector<uint8_t> &lane_flags);
80void visualize(string &full_im_name, vector<vector<Point2f>> &anno_lanes, vector<vector<Point2f>> &detect_lanes, vector<int> anno_match, int width_lane, string visualize_path);
81int32_t createDirectory(const std::string &directoryPath)
82{
83 uint32_t dirPathLen = directoryPath.length();
84 if (dirPathLen > MAX_PATH_LEN)
85 {
86 return -1;
87 }
88 char tmpDirPath[MAX_PATH_LEN] = { 0 };
89 for (uint32_t i = 0; i < dirPathLen; ++i)
90 {
91 tmpDirPath[i] = directoryPath[i];
92 if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/')
93 {
94 if (ACCESS(tmpDirPath, 0) != 0)
95 {
96 int32_t ret = MKDIR(tmpDirPath);
97 if (ret != 0)
98 {
99 return ret;
100 }
101 }
102 }
103 }
104 return 0;
105}
106
107int main(int argc, char **argv)
108{

Callers 1

visualizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected