| 1740 | |
| 1741 | |
| 1742 | bool Line::Util_DoesFileExist(LPCTSTR szFilename) // Returns true if file or directory exists. |
| 1743 | { |
| 1744 | if ( _tcschr(szFilename,'*')||_tcschr(szFilename,'?') ) |
| 1745 | { |
| 1746 | WIN32_FIND_DATA wfd; |
| 1747 | HANDLE hFile; |
| 1748 | |
| 1749 | hFile = FindFirstFile(szFilename, &wfd); |
| 1750 | |
| 1751 | if ( hFile == INVALID_HANDLE_VALUE ) |
| 1752 | return false; |
| 1753 | |
| 1754 | FindClose(hFile); |
| 1755 | return true; |
| 1756 | } |
| 1757 | else |
| 1758 | { |
| 1759 | DWORD dwTemp; |
| 1760 | |
| 1761 | dwTemp = GetFileAttributes(szFilename); |
| 1762 | if ( dwTemp != 0xffffffff ) |
| 1763 | return true; |
| 1764 | else |
| 1765 | return false; |
| 1766 | } |
| 1767 | } |
| 1768 | |
| 1769 | |
| 1770 |
nothing calls this directly
no outgoing calls
no test coverage detected