| 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 #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> | 10 #include <unistd.h> |
| 11 | 11 |
| 12 #include "base/eintr_wrapper.h" | |
| 13 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 14 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/posix/eintr_wrapper.h" |
| 15 #include "base/threading/thread_restrictions.h" | 15 #include "base/threading/thread_restrictions.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 | 17 |
| 18 #if defined(OS_ANDROID) | 18 #if defined(OS_ANDROID) |
| 19 #include "base/os_compat_android.h" | 19 #include "base/os_compat_android.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 | 23 |
| 24 // Make sure our Whence mappings match the system headers. | 24 // Make sure our Whence mappings match the system headers. |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 info->is_directory = S_ISDIR(file_info.st_mode); | 309 info->is_directory = S_ISDIR(file_info.st_mode); |
| 310 info->is_symbolic_link = S_ISLNK(file_info.st_mode); | 310 info->is_symbolic_link = S_ISLNK(file_info.st_mode); |
| 311 info->size = file_info.st_size; | 311 info->size = file_info.st_size; |
| 312 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); | 312 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); |
| 313 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); | 313 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); |
| 314 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); | 314 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); |
| 315 return true; | 315 return true; |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace base | 318 } // namespace base |
| OLD | NEW |