| 162 | } |
| 163 | |
| 164 | SecureSubdirectory SecureSubdirectory::Create(const fs::path& parent, |
| 165 | const std::wstring& name, |
| 166 | bool isElevated, |
| 167 | bool deleteOnDestruct, |
| 168 | bool clearOnConstruct) |
| 169 | { |
| 170 | SecureSubdirectory d; |
| 171 | d.isElevated_ = isElevated; |
| 172 | d.deleteOnDestruct_ = deleteOnDestruct; |
| 173 | d.path_ = parent / name; |
| 174 | d.hDirectory_ = CreateOrOpenDirSystemOnlySecure_(parent, name, isElevated); |
| 175 | |
| 176 | if (clearOnConstruct) { |
| 177 | d.Clear(); |
| 178 | } |
| 179 | |
| 180 | return d; |
| 181 | } |
| 182 | |
| 183 | SecureSubdirectory SecureSubdirectory::CreateInSystemTemp(const std::wstring& name, |
| 184 | bool isElevated, |
nothing calls this directly
no test coverage detected