Changeset 23302 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Sep 24, 2009 5:00:38 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 52797
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/fileio-win.cpp
r23047 r23302 126 126 127 127 return fIsBeyondLimit; 128 }129 130 131 RTDECL(bool) RTFileExists(const char *pszPath)132 {133 bool fRc = false;134 135 /*136 * Convert to UTF-16.137 */138 PRTUTF16 pwszString;139 int rc = RTStrToUtf16(pszPath, &pwszString);140 AssertRC(rc);141 if (RT_SUCCESS(rc))142 {143 /*144 * Query and check attributes.145 */146 DWORD dwAttr = GetFileAttributesW((LPCWSTR)pwszString);147 fRc = dwAttr != INVALID_FILE_ATTRIBUTES148 && !(dwAttr & ( FILE_ATTRIBUTE_DIRECTORY149 | FILE_ATTRIBUTE_DEVICE150 | FILE_ATTRIBUTE_REPARSE_POINT));151 RTUtf16Free(pwszString);152 }153 154 LogFlow(("RTFileExists(%p:{%s}): returns %RTbool\n", pszPath, pszPath, fRc));155 return fRc;156 128 } 157 129
Note:
See TracChangeset
for help on using the changeset viewer.