Determine if the file exists

xiaoxiao2021-03-06  40

BOOL FileExists (LPCTSTR lpszFileName) {BOOL bRet; HANDLE hFind; WIN32_FIND_DATA wfd; hFind = FindFirstFile (lpszFileName, & wfd);! BRet = hFind = INVALID_HANDLE_VALUE; FindClose (hFind); return bRet;}

Code Description: LPSZFileName: To determine if the file name exists. Return Value: Returns true if it exists, otherwise returns false.

转载请注明原文地址:https://www.9cbs.com/read-118459.html

New Post(0)