MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey-v1.0 / DoesFilePatternExist

Function DoesFilePatternExist

Source/util.cpp:867–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865
866
867bool DoesFilePatternExist(char *aFilePattern)
868// Adapted from the AutoIt3 source:
869{
870 if (!aFilePattern || !*aFilePattern) return false;
871 if (StrChrAny(aFilePattern, "?*"))
872 {
873 WIN32_FIND_DATA wfd;
874 HANDLE hFile = FindFirstFile(aFilePattern, &wfd);
875 if (hFile == INVALID_HANDLE_VALUE)
876 return false;
877 FindClose(hFile);
878 return true;
879 }
880 else
881 {
882 DWORD dwTemp = GetFileAttributes(aFilePattern);
883 return dwTemp != 0xFFFFFFFF;
884 }
885}
886
887
888

Callers 1

EvaluateConditionMethod · 0.85

Calls 1

StrChrAnyFunction · 0.85

Tested by

no test coverage detected