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

Function FileAttribToStr

source/util.cpp:1619–1644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1617
1618
1619LPTSTR FileAttribToStr(LPTSTR aBuf, DWORD aAttr)
1620// Caller must ensure that aAttr is valid (i.e. that it's not 0xFFFFFFFF).
1621{
1622 if (!aBuf) return aBuf;
1623 int length = 0;
1624 if (aAttr & FILE_ATTRIBUTE_READONLY)
1625 aBuf[length++] = 'R';
1626 if (aAttr & FILE_ATTRIBUTE_ARCHIVE)
1627 aBuf[length++] = 'A';
1628 if (aAttr & FILE_ATTRIBUTE_SYSTEM)
1629 aBuf[length++] = 'S';
1630 if (aAttr & FILE_ATTRIBUTE_HIDDEN)
1631 aBuf[length++] = 'H';
1632 if (aAttr & FILE_ATTRIBUTE_NORMAL)
1633 aBuf[length++] = 'N';
1634 if (aAttr & FILE_ATTRIBUTE_DIRECTORY)
1635 aBuf[length++] = 'D';
1636 if (aAttr & FILE_ATTRIBUTE_OFFLINE)
1637 aBuf[length++] = 'O';
1638 if (aAttr & FILE_ATTRIBUTE_COMPRESSED)
1639 aBuf[length++] = 'C';
1640 if (aAttr & FILE_ATTRIBUTE_TEMPORARY)
1641 aBuf[length++] = 'T';
1642 aBuf[length] = '\0'; // Perform the final termination.
1643 return aBuf;
1644}
1645
1646
1647

Callers 2

BIF_DECLFunction · 0.85
BIV_DECL_RFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected