MCPcopy Create free account
hub / github.com/HyperDbg/HyperDbg / FileExists

Function FileExists

hyperdbg/script-engine/code/script_include.c:151–163  ·  view source on GitHub ↗

* @brief Checks whether a file exists at the given path * * @param Path the file path to check * @return BOOLEAN TRUE if the file exists, FALSE otherwise */

Source from the content-addressed store, hash-verified

149 * @return BOOLEAN TRUE if the file exists, FALSE otherwise
150 */
151BOOLEAN
152FileExists(const char * Path)
153{
154 DWORD Attr = GetFileAttributesA(Path);
155
156 if (Attr == INVALID_FILE_ATTRIBUTES)
157 return FALSE;
158
159 if (Attr & FILE_ATTRIBUTE_DIRECTORY)
160 return FALSE;
161
162 return TRUE;
163}
164
165/**
166 * @brief Reads and parses an include file into a buffer

Callers 1

CodeGenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected