OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_PLATFORM_FILE_H_ | 5 #ifndef BASE_PLATFORM_FILE_H_ |
6 #define BASE_PLATFORM_FILE_H_ | 6 #define BASE_PLATFORM_FILE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "base/basictypes.h" |
| 10 |
9 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
10 #include <windows.h> | 12 #include <windows.h> |
11 #endif | 13 #endif |
12 | 14 |
13 #include <string> | 15 #include <string> |
14 | 16 |
15 class FilePath; | 17 class FilePath; |
16 | 18 |
17 namespace base { | 19 namespace base { |
18 | 20 |
(...skipping 27 matching lines...) Expand all Loading... |
46 int flags, | 48 int flags, |
47 bool* created); | 49 bool* created); |
48 // Deprecated. | 50 // Deprecated. |
49 PlatformFile CreatePlatformFile(const std::wstring& name, | 51 PlatformFile CreatePlatformFile(const std::wstring& name, |
50 int flags, | 52 int flags, |
51 bool* created); | 53 bool* created); |
52 | 54 |
53 // Closes a file handle | 55 // Closes a file handle |
54 bool ClosePlatformFile(PlatformFile file); | 56 bool ClosePlatformFile(PlatformFile file); |
55 | 57 |
| 58 // Get the length of an underlying file. Returns false on error. Otherwise |
| 59 // *size is set to the length of the file, in bytes. |
| 60 bool GetPlatformFileSize(PlatformFile file, uint64* size); |
| 61 |
56 } // namespace base | 62 } // namespace base |
57 | 63 |
58 #endif // BASE_PLATFORM_FILE_H_ | 64 #endif // BASE_PLATFORM_FILE_H_ |
OLD | NEW |