MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / BuildFileAttributeString

Function BuildFileAttributeString

Explorer++/Helper/Helper.cpp:195–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195HRESULT BuildFileAttributeString(const TCHAR *lpszFileName, TCHAR *szOutput, size_t cchMax)
196{
197 /* FindFirstFile is used instead of GetFileAttributes() or
198 GetFileAttributesEx() because of its behaviour
199 in relation to system files that normally
200 won't have their attributes given (such as the
201 pagefile, which neither of the two functions
202 above can retrieve the attributes of). */
203 WIN32_FIND_DATA wfd;
204 wil::unique_hfind findFile(FindFirstFile(lpszFileName, &wfd));
205 HRESULT hr = E_FAIL;
206
207 if(findFile)
208 {
209 hr = BuildFileAttributeString(wfd.dwFileAttributes, szOutput, cchMax);
210 }
211
212 return hr;
213}
214
215HRESULT BuildFileAttributeString(DWORD dwFileAttributes, TCHAR *szOutput, size_t cchMax)
216{

Callers 5

EditColorRuleMethod · 0.85
GetAttributeColumnTextFunction · 0.85
RunTestMethod · 0.85

Calls 1

EnterAttributeIntoStringFunction · 0.85

Tested by 1

RunTestMethod · 0.68