MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / OpenFile

Method OpenFile

libcppcryptfs/file/openfiles.cpp:35–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35bool CryptOpenFiles::OpenFile(LPCWSTR path, HANDLE h)
36{
37 wstring ucpath;
38
39 if (!touppercase(path, ucpath)) {
40 assert(false);
41 return false;
42 }
43
44 lock_guard<mutex> lock(m_mutex);
45
46 auto it = m_openfiles.find(ucpath);
47
48 if (it != m_openfiles.end()) {
49 it->second->Open(h);
50 } else {
51 m_openfiles[ucpath] = make_shared<::CryptOpenFile>(h);
52 }
53
54 return true;
55}
56
57bool CryptOpenFiles::CloseFile(LPCWSTR path, HANDLE h)
58{

Calls 3

touppercaseFunction · 0.85
findMethod · 0.80
OpenMethod · 0.80

Tested by

no test coverage detected