OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 PLATFORM_FILE_ERROR_NOT_A_FILE = -13, | 64 PLATFORM_FILE_ERROR_NOT_A_FILE = -13, |
65 PLATFORM_FILE_ERROR_NOT_EMPTY = -14, | 65 PLATFORM_FILE_ERROR_NOT_EMPTY = -14, |
66 }; | 66 }; |
67 | 67 |
68 // Used to hold information about a given file. | 68 // Used to hold information about a given file. |
69 // If you add more fields to this structure (platform-specific fields are OK), | 69 // If you add more fields to this structure (platform-specific fields are OK), |
70 // make sure to update all functions that use it in file_util_{win|posix}.cc | 70 // make sure to update all functions that use it in file_util_{win|posix}.cc |
71 // too, and the ParamTraits<base::PlatformFileInfo> implementation in | 71 // too, and the ParamTraits<base::PlatformFileInfo> implementation in |
72 // chrome/common/common_param_traits.cc. | 72 // chrome/common/common_param_traits.cc. |
73 struct PlatformFileInfo { | 73 struct PlatformFileInfo { |
| 74 PlatformFileInfo(); |
| 75 ~PlatformFileInfo(); |
| 76 |
74 // The size of the file in bytes. Undefined when is_directory is true. | 77 // The size of the file in bytes. Undefined when is_directory is true. |
75 int64 size; | 78 int64 size; |
76 | 79 |
77 // True if the file corresponds to a directory. | 80 // True if the file corresponds to a directory. |
78 bool is_directory; | 81 bool is_directory; |
79 | 82 |
80 // True if the file corresponds to a symbolic link. | 83 // True if the file corresponds to a symbolic link. |
81 bool is_symbolic_link; | 84 bool is_symbolic_link; |
82 | 85 |
83 // The last modified time of a file. | 86 // The last modified time of a file. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 return temp; | 167 return temp; |
165 } | 168 } |
166 | 169 |
167 private: | 170 private: |
168 PlatformFile* value_; | 171 PlatformFile* value_; |
169 }; | 172 }; |
170 | 173 |
171 } // namespace base | 174 } // namespace base |
172 | 175 |
173 #endif // BASE_PLATFORM_FILE_H_ | 176 #endif // BASE_PLATFORM_FILE_H_ |
OLD | NEW |