| 244 | |
| 245 | |
| 246 | int MountPointManager::get_open_handle_count(const wchar_t *mountpoint) |
| 247 | { |
| 248 | int count = 0; |
| 249 | |
| 250 | if (!mountpoint) { |
| 251 | for (auto& td : m_tdatas) { |
| 252 | count += static_cast<int>(td.second->con.m_open_handles.size()); |
| 253 | } |
| 254 | } else { |
| 255 | auto it = m_tdatas.find(mountpoint); |
| 256 | if (it == m_tdatas.end()) { |
| 257 | return -1; |
| 258 | } |
| 259 | count = static_cast<int>(it->second->con.m_open_handles.size()); |
| 260 | } |
| 261 | |
| 262 | return count; |
| 263 | } |
no test coverage detected