Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: base/platform_file_win.cc

Issue 9004052: GetPlatformFileInfo was always never returning directory (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 10
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 BY_HANDLE_FILE_INFORMATION file_info; 210 BY_HANDLE_FILE_INFORMATION file_info;
211 if (GetFileInformationByHandle(file, &file_info) == 0) 211 if (GetFileInformationByHandle(file, &file_info) == 0)
212 return false; 212 return false;
213 213
214 LARGE_INTEGER size; 214 LARGE_INTEGER size;
215 size.HighPart = file_info.nFileSizeHigh; 215 size.HighPart = file_info.nFileSizeHigh;
216 size.LowPart = file_info.nFileSizeLow; 216 size.LowPart = file_info.nFileSizeLow;
217 info->size = size.QuadPart; 217 info->size = size.QuadPart;
218 info->is_directory = 218 info->is_directory =
219 file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY != 0; 219 (file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
220 info->is_symbolic_link = false; // Windows doesn't have symbolic links. 220 info->is_symbolic_link = false; // Windows doesn't have symbolic links.
221 info->last_modified = base::Time::FromFileTime(file_info.ftLastWriteTime); 221 info->last_modified = base::Time::FromFileTime(file_info.ftLastWriteTime);
222 info->last_accessed = base::Time::FromFileTime(file_info.ftLastAccessTime); 222 info->last_accessed = base::Time::FromFileTime(file_info.ftLastAccessTime);
223 info->creation_time = base::Time::FromFileTime(file_info.ftCreationTime); 223 info->creation_time = base::Time::FromFileTime(file_info.ftCreationTime);
224 return true; 224 return true;
225 } 225 }
226 226
227 } // namespace base 227 } // namespace base
OLDNEW
« no previous file with comments | « base/file_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698