OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/base_export.h" | 15 #include "base/base_export.h" |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
18 #include "base/time.h" | 18 #include "base/time/time.h" |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 | 21 |
22 // PLATFORM_FILE_(OPEN|CREATE).* are mutually exclusive. You should specify | 22 // PLATFORM_FILE_(OPEN|CREATE).* are mutually exclusive. You should specify |
23 // exactly one of the five (possibly combining with other flags) when opening | 23 // exactly one of the five (possibly combining with other flags) when opening |
24 // or creating a file. | 24 // or creating a file. |
25 // PLATFORM_FILE_(WRITE|APPEND) are mutually exclusive. This is so that APPEND | 25 // PLATFORM_FILE_(WRITE|APPEND) are mutually exclusive. This is so that APPEND |
26 // behavior will be consistent with O_APPEND on POSIX. | 26 // behavior will be consistent with O_APPEND on POSIX. |
27 enum PlatformFileFlags { | 27 enum PlatformFileFlags { |
28 PLATFORM_FILE_OPEN = 1 << 0, // Opens a file, only if it exists. | 28 PLATFORM_FILE_OPEN = 1 << 0, // Opens a file, only if it exists. |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 return temp; | 245 return temp; |
246 } | 246 } |
247 | 247 |
248 private: | 248 private: |
249 PlatformFile* value_; | 249 PlatformFile* value_; |
250 }; | 250 }; |
251 | 251 |
252 } // namespace base | 252 } // namespace base |
253 | 253 |
254 #endif // BASE_PLATFORM_FILE_H_ | 254 #endif // BASE_PLATFORM_FILE_H_ |
OLD | NEW |