MCPcopy Create free account
hub / github.com/creatale/node-dv / opendir

Function opendir

deps/opencv/modules/core/src/glob.cpp:76–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 };
75
76 DIR* opendir(const char* path)
77 {
78 DIR* dir = new DIR;
79 dir->ent.d_name = 0;
80#ifdef HAVE_WINRT
81 cv::String full_path = cv::String(path) + "\\*";
82 wchar_t wfull_path[MAX_PATH];
83 size_t copied = mbstowcs(wfull_path, full_path.c_str(), MAX_PATH);
84 CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
85 dir->handle = ::FindFirstFileExW(wfull_path, FindExInfoStandard,
86 &dir->data, FindExSearchNameMatch, NULL, 0);
87#else
88 dir->handle = ::FindFirstFileExA((cv::String(path) + "\\*").c_str(),
89 FindExInfoStandard, &dir->data, FindExSearchNameMatch, NULL, 0);
90#endif
91 if(dir->handle == INVALID_HANDLE_VALUE)
92 {
93 /*closedir will do all cleanup*/
94 delete dir;
95 return 0;
96 }
97 return dir;
98 }
99
100 dirent* readdir(DIR* dir)
101 {

Callers 3

getFilenamesInDirectoryFunction · 0.85
glob_recFunction · 0.85

Calls 2

StringClass · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected