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> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 PLATFORM_FILE_WRITE_ATTRIBUTES = 1 << 13, // Used on Windows only | 43 PLATFORM_FILE_WRITE_ATTRIBUTES = 1 << 13, // Used on Windows only |
44 PLATFORM_FILE_ENUMERATE = 1 << 14, // May enumerate directory | 44 PLATFORM_FILE_ENUMERATE = 1 << 14, // May enumerate directory |
45 | 45 |
46 PLATFORM_FILE_SHARE_DELETE = 1 << 15, // Used on Windows only | 46 PLATFORM_FILE_SHARE_DELETE = 1 << 15, // Used on Windows only |
47 | 47 |
48 PLATFORM_FILE_TERMINAL_DEVICE = 1 << 16, // Serial port flags | 48 PLATFORM_FILE_TERMINAL_DEVICE = 1 << 16, // Serial port flags |
49 PLATFORM_FILE_BACKUP_SEMANTICS = 1 << 17, // Used on Windows only | 49 PLATFORM_FILE_BACKUP_SEMANTICS = 1 << 17, // Used on Windows only |
50 | 50 |
51 PLATFORM_FILE_EXECUTE = 1 << 18, // Used on Windows only | 51 PLATFORM_FILE_EXECUTE = 1 << 18, // Used on Windows only |
| 52 |
| 53 PLATFORM_FILE_APPEND = 1 << 19, |
52 }; | 54 }; |
53 | 55 |
54 // PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of | 56 // PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of |
55 // a filesystem restriction. PLATFORM_FILE_ERROR_SECURITY is returned when a | 57 // a filesystem restriction. PLATFORM_FILE_ERROR_SECURITY is returned when a |
56 // browser policy doesn't allow the operation to be executed. | 58 // browser policy doesn't allow the operation to be executed. |
57 enum PlatformFileError { | 59 enum PlatformFileError { |
58 PLATFORM_FILE_OK = 0, | 60 PLATFORM_FILE_OK = 0, |
59 PLATFORM_FILE_ERROR_FAILED = -1, | 61 PLATFORM_FILE_ERROR_FAILED = -1, |
60 PLATFORM_FILE_ERROR_IN_USE = -2, | 62 PLATFORM_FILE_ERROR_IN_USE = -2, |
61 PLATFORM_FILE_ERROR_EXISTS = -3, | 63 PLATFORM_FILE_ERROR_EXISTS = -3, |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 return temp; | 242 return temp; |
241 } | 243 } |
242 | 244 |
243 private: | 245 private: |
244 PlatformFile* value_; | 246 PlatformFile* value_; |
245 }; | 247 }; |
246 | 248 |
247 } // namespace base | 249 } // namespace base |
248 | 250 |
249 #endif // BASE_PLATFORM_FILE_H_ | 251 #endif // BASE_PLATFORM_FILE_H_ |
OLD | NEW |