MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / FileSetAttribCallback

Function FileSetAttribCallback

source/script2.cpp:8537–8547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8535}
8536
8537BOOL FileSetAttribCallback(LPTSTR file_path, WIN32_FIND_DATA &current_file, void *aCallbackData)
8538{
8539 FileSetAttribData &attrib = *(FileSetAttribData *)aCallbackData;
8540 DWORD file_attrib = ((current_file.dwFileAttributes & attrib.and_mask) ^ attrib.xor_mask);
8541 if (!SetFileAttributes(file_path, file_attrib))
8542 {
8543 g->LastError = GetLastError();
8544 return FALSE;
8545 }
8546 return TRUE;
8547}
8548
8549
8550

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected