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

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

Issue 11348006: Remove file name from File C++ structure. It is not used. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « runtime/bin/file_test.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) 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 "bin/file.h" 5 #include "bin/file.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <io.h> 8 #include <io.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int fd = open(name, flags, 0666); 107 int fd = open(name, flags, 0666);
108 if (fd < 0) { 108 if (fd < 0) {
109 return NULL; 109 return NULL;
110 } 110 }
111 if (((mode & kWrite) != 0) && ((mode & kTruncate) == 0)) { 111 if (((mode & kWrite) != 0) && ((mode & kTruncate) == 0)) {
112 int position = lseek(fd, 0, SEEK_END); 112 int position = lseek(fd, 0, SEEK_END);
113 if (position < 0) { 113 if (position < 0) {
114 return NULL; 114 return NULL;
115 } 115 }
116 } 116 }
117 return new File(name, new FileHandle(fd)); 117 return new File(new FileHandle(fd));
118 } 118 }
119 119
120 120
121 File* File::OpenStdio(int fd) { 121 File* File::OpenStdio(int fd) {
122 UNREACHABLE(); 122 UNREACHABLE();
123 return NULL; 123 return NULL;
124 } 124 }
125 125
126 126
127 bool File::Exists(const char* name) { 127 bool File::Exists(const char* name) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 const char* File::StringEscapedPathSeparator() { 225 const char* File::StringEscapedPathSeparator() {
226 return "\\\\"; 226 return "\\\\";
227 } 227 }
228 228
229 229
230 File::StdioHandleType File::GetStdioHandleType(int fd) { 230 File::StdioHandleType File::GetStdioHandleType(int fd) {
231 // Treat all stdio handles as pipes. The Windows event handler and 231 // Treat all stdio handles as pipes. The Windows event handler and
232 // socket code will handle the different handle types. 232 // socket code will handle the different handle types.
233 return kPipe; 233 return kPipe;
234 } 234 }
OLDNEW
« no previous file with comments | « runtime/bin/file_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698