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

Side by Side Diff: runtime/bin/file_win.cc

Issue 173803005: Version 1.2.0-dev.5.13 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 10 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 | « no previous file | sdk/bin/docgen.bat » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include <fcntl.h> // NOLINT 10 #include <fcntl.h> // NOLINT
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 448 }
449 449
450 450
451 void File::Stat(const char* name, int64_t* data) { 451 void File::Stat(const char* name, int64_t* data) {
452 File::Type type = GetType(name, false); 452 File::Type type = GetType(name, false);
453 data[kType] = type; 453 data[kType] = type;
454 if (type != kDoesNotExist) { 454 if (type != kDoesNotExist) {
455 struct _stat64 st; 455 struct _stat64 st;
456 const wchar_t* system_name = StringUtils::Utf8ToWide(name); 456 const wchar_t* system_name = StringUtils::Utf8ToWide(name);
457 int stat_status = _wstat64(system_name, &st); 457 int stat_status = _wstat64(system_name, &st);
458 free(const_cast<wchar_t*>(system_name));
458 if (stat_status == 0) { 459 if (stat_status == 0) {
459 data[kCreatedTime] = st.st_ctime; 460 data[kCreatedTime] = st.st_ctime;
460 data[kModifiedTime] = st.st_mtime; 461 data[kModifiedTime] = st.st_mtime;
461 data[kAccessedTime] = st.st_atime; 462 data[kAccessedTime] = st.st_atime;
462 data[kMode] = st.st_mode; 463 data[kMode] = st.st_mode;
463 data[kSize] = st.st_size; 464 data[kSize] = st.st_size;
464 } else { 465 } else {
465 data[kType] = File::kDoesNotExist; 466 data[kType] = File::kDoesNotExist;
466 } 467 }
467 } 468 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 return kIdentical; 628 return kIdentical;
628 } else { 629 } else {
629 return kDifferent; 630 return kDifferent;
630 } 631 }
631 } 632 }
632 633
633 } // namespace bin 634 } // namespace bin
634 } // namespace dart 635 } // namespace dart
635 636
636 #endif // defined(TARGET_OS_WINDOWS) 637 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« no previous file with comments | « no previous file | sdk/bin/docgen.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698