OLD | NEW |
---|---|
1 // Copyright (c) 2011 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 #include "base/platform_file.h" | 5 #include "base/platform_file.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
10 #include <unistd.h> | |
tzik
2011/06/15 09:38:19
for close()
| |
10 | 11 |
11 #include "base/eintr_wrapper.h" | 12 #include "base/eintr_wrapper.h" |
12 #include "base/file_path.h" | 13 #include "base/file_path.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 | 18 |
18 #if defined(OS_OPENBSD) || defined(OS_FREEBSD) || \ | 19 #if defined(OS_OPENBSD) || defined(OS_FREEBSD) || \ |
19 (defined(OS_MACOSX) && \ | 20 (defined(OS_MACOSX) && \ |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 info->is_directory = S_ISDIR(file_info.st_mode); | 186 info->is_directory = S_ISDIR(file_info.st_mode); |
186 info->is_symbolic_link = S_ISLNK(file_info.st_mode); | 187 info->is_symbolic_link = S_ISLNK(file_info.st_mode); |
187 info->size = file_info.st_size; | 188 info->size = file_info.st_size; |
188 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); | 189 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); |
189 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); | 190 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); |
190 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); | 191 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); |
191 return true; | 192 return true; |
192 } | 193 } |
193 | 194 |
194 } // namespace base | 195 } // namespace base |
OLD | NEW |