OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkTypes.h" | 8 #include "SkTypes.h" |
9 #if defined(SK_BUILD_FOR_WIN32) | 9 #if defined(SK_BUILD_FOR_WIN32) |
10 | 10 |
| 11 #include "SkLeanWindows.h" |
11 #include "SkOSFile.h" | 12 #include "SkOSFile.h" |
12 | |
13 #include "SkTFitsIn.h" | 13 #include "SkTFitsIn.h" |
14 | 14 |
15 #include <io.h> | 15 #include <io.h> |
16 #include <stdio.h> | 16 #include <stdio.h> |
17 #include <sys/stat.h> | 17 #include <sys/stat.h> |
18 | 18 |
19 bool sk_exists(const char *path, SkFILE_Flags flags) { | 19 bool sk_exists(const char *path, SkFILE_Flags flags) { |
20 int mode = 0; // existence | 20 int mode = 0; // existence |
21 if (flags & kRead_SkFILE_Flag) { | 21 if (flags & kRead_SkFILE_Flag) { |
22 mode |= 4; // read | 22 mode |= 4; // read |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 self.fHandle = ::FindFirstFileW((LPCWSTR)self.fPath16, &data); | 239 self.fHandle = ::FindFirstFileW((LPCWSTR)self.fPath16, &data); |
240 if (self.fHandle != 0 && self.fHandle != (HANDLE)~0) { | 240 if (self.fHandle != 0 && self.fHandle != (HANDLE)~0) { |
241 dataPtr = &data; | 241 dataPtr = &data; |
242 } | 242 } |
243 } | 243 } |
244 return self.fHandle != (HANDLE)~0 && get_the_file(self.fHandle, name, dataPt
r, getDir); | 244 return self.fHandle != (HANDLE)~0 && get_the_file(self.fHandle, name, dataPt
r, getDir); |
245 } | 245 } |
246 | 246 |
247 #endif//defined(SK_BUILD_FOR_WIN32) | 247 #endif//defined(SK_BUILD_FOR_WIN32) |
OLD | NEW |