| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include "webrtc/test/testsupport/fileutils.h" | 11 #include "webrtc/test/testsupport/fileutils.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 | 14 |
| 15 #ifdef WIN32 | 15 #ifdef WIN32 |
| 16 #include <direct.h> | 16 #include <direct.h> |
| 17 #include <tchar.h> | 17 #include <tchar.h> |
| 18 #include <windows.h> | 18 #include <windows.h> |
| 19 #include <algorithm> | 19 #include <algorithm> |
| 20 | 20 |
| 21 #include "Shlwapi.h" | 21 #include "Shlwapi.h" |
| 22 #include "WinDef.h" | 22 #include "WinDef.h" |
| 23 | 23 |
| 24 #include "webrtc/base/win32.h" | 24 #include "webrtc/rtc_base/win32.h" |
| 25 #define GET_CURRENT_DIR _getcwd | 25 #define GET_CURRENT_DIR _getcwd |
| 26 #else | 26 #else |
| 27 #include <dirent.h> | 27 #include <dirent.h> |
| 28 #include <unistd.h> | 28 #include <unistd.h> |
| 29 | 29 |
| 30 #define GET_CURRENT_DIR getcwd | 30 #define GET_CURRENT_DIR getcwd |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 #include <sys/stat.h> // To check for directory existence. | 33 #include <sys/stat.h> // To check for directory existence. |
| 34 #ifndef S_ISDIR // Not defined in stat.h on Windows. | 34 #ifndef S_ISDIR // Not defined in stat.h on Windows. |
| 35 #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) | 35 #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 #include <stdio.h> | 38 #include <stdio.h> |
| 39 #include <stdlib.h> | 39 #include <stdlib.h> |
| 40 #include <string.h> | 40 #include <string.h> |
| 41 | 41 |
| 42 #include <memory> | 42 #include <memory> |
| 43 #include <utility> | 43 #include <utility> |
| 44 | 44 |
| 45 #include "webrtc/base/checks.h" | 45 #include "webrtc/rtc_base/checks.h" |
| 46 #include "webrtc/typedefs.h" // For architecture defines | 46 #include "webrtc/typedefs.h" // For architecture defines |
| 47 | 47 |
| 48 namespace webrtc { | 48 namespace webrtc { |
| 49 namespace test { | 49 namespace test { |
| 50 | 50 |
| 51 #if defined(WEBRTC_IOS) | 51 #if defined(WEBRTC_IOS) |
| 52 // Defined in iosfileutils.mm. No header file to discourage use elsewhere. | 52 // Defined in iosfileutils.mm. No header file to discourage use elsewhere. |
| 53 std::string IOSOutputPath(); | 53 std::string IOSOutputPath(); |
| 54 std::string IOSRootPath(); | 54 std::string IOSRootPath(); |
| 55 std::string IOSResourcePath(std::string name, std::string extension); | 55 std::string IOSResourcePath(std::string name, std::string extension); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 if (fseek(f, 0, SEEK_END) == 0) { | 354 if (fseek(f, 0, SEEK_END) == 0) { |
| 355 size = ftell(f); | 355 size = ftell(f); |
| 356 } | 356 } |
| 357 fclose(f); | 357 fclose(f); |
| 358 } | 358 } |
| 359 return size; | 359 return size; |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace test | 362 } // namespace test |
| 363 } // namespace webrtc | 363 } // namespace webrtc |
| OLD | NEW |