mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[NOTEPAD] Simplify FileExists function (#5079)
Simplify FileExists helper function by using GetFileAttributes function. CORE-18837
This commit is contained in:
parent
ebc69d089f
commit
504bf68e2a
1 changed files with 1 additions and 7 deletions
|
@ -228,13 +228,7 @@ static void AlertPrintError(void)
|
||||||
*/
|
*/
|
||||||
BOOL FileExists(LPCTSTR szFilename)
|
BOOL FileExists(LPCTSTR szFilename)
|
||||||
{
|
{
|
||||||
WIN32_FIND_DATA entry;
|
return GetFileAttributes(szFilename) != INVALID_FILE_ATTRIBUTES;
|
||||||
HANDLE hFile;
|
|
||||||
|
|
||||||
hFile = FindFirstFile(szFilename, &entry);
|
|
||||||
FindClose(hFile);
|
|
||||||
|
|
||||||
return (hFile != INVALID_HANDLE_VALUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL HasFileExtension(LPCTSTR szFilename)
|
BOOL HasFileExtension(LPCTSTR szFilename)
|
||||||
|
|
Loading…
Reference in a new issue