OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/thread_restrictions.h" | 9 #include "base/thread_restrictions.h" |
10 | 10 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 BY_HANDLE_FILE_INFORMATION file_info; | 207 BY_HANDLE_FILE_INFORMATION file_info; |
208 if (GetFileInformationByHandle(file, &file_info) == 0) | 208 if (GetFileInformationByHandle(file, &file_info) == 0) |
209 return false; | 209 return false; |
210 | 210 |
211 LARGE_INTEGER size; | 211 LARGE_INTEGER size; |
212 size.HighPart = file_info.nFileSizeHigh; | 212 size.HighPart = file_info.nFileSizeHigh; |
213 size.LowPart = file_info.nFileSizeLow; | 213 size.LowPart = file_info.nFileSizeLow; |
214 info->size = size.QuadPart; | 214 info->size = size.QuadPart; |
215 info->is_directory = | 215 info->is_directory = |
216 file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY != 0; | 216 file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY != 0; |
| 217 info->is_symbolic_link = false; // Windows doesn't have symbolic links. |
217 info->last_modified = base::Time::FromFileTime(file_info.ftLastWriteTime); | 218 info->last_modified = base::Time::FromFileTime(file_info.ftLastWriteTime); |
218 info->last_accessed = base::Time::FromFileTime(file_info.ftLastAccessTime); | 219 info->last_accessed = base::Time::FromFileTime(file_info.ftLastAccessTime); |
219 info->creation_time = base::Time::FromFileTime(file_info.ftCreationTime); | 220 info->creation_time = base::Time::FromFileTime(file_info.ftCreationTime); |
220 return true; | 221 return true; |
221 } | 222 } |
222 | 223 |
223 } // namespace disk_cache | 224 } // namespace disk_cache |
OLD | NEW |