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

Side by Side Diff: sdk/lib/io/stdio.dart

Issue 52263005: Add IOSink:flush(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/io/io_sink.dart ('k') | tests/standalone/io/io_sink_test.dart » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.io; 5 part of dart.io;
6 6
7 const int _STDIO_HANDLE_TYPE_TERMINAL = 0; 7 const int _STDIO_HANDLE_TYPE_TERMINAL = 0;
8 const int _STDIO_HANDLE_TYPE_PIPE = 1; 8 const int _STDIO_HANDLE_TYPE_PIPE = 1;
9 const int _STDIO_HANDLE_TYPE_FILE = 2; 9 const int _STDIO_HANDLE_TYPE_FILE = 2;
10 const int _STDIO_HANDLE_TYPE_SOCKET = 3; 10 const int _STDIO_HANDLE_TYPE_SOCKET = 3;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 _sink.encoding = encoding; 159 _sink.encoding = encoding;
160 } 160 }
161 void write(object) => _sink.write(object); 161 void write(object) => _sink.write(object);
162 void writeln([object = "" ]) => _sink.writeln(object); 162 void writeln([object = "" ]) => _sink.writeln(object);
163 void writeAll(objects, [sep = ""]) => _sink.writeAll(objects, sep); 163 void writeAll(objects, [sep = ""]) => _sink.writeAll(objects, sep);
164 void add(List<int> data) => _sink.add(data); 164 void add(List<int> data) => _sink.add(data);
165 void addError(error, [StackTrace stackTrace]) => 165 void addError(error, [StackTrace stackTrace]) =>
166 _sink.addError(error, stackTrace); 166 _sink.addError(error, stackTrace);
167 void writeCharCode(int charCode) => _sink.writeCharCode(charCode); 167 void writeCharCode(int charCode) => _sink.writeCharCode(charCode);
168 Future addStream(Stream<List<int>> stream) => _sink.addStream(stream); 168 Future addStream(Stream<List<int>> stream) => _sink.addStream(stream);
169 Future flush() => _sink.flush();
169 Future close() => _sink.close(); 170 Future close() => _sink.close();
170 Future get done => _sink.done; 171 Future get done => _sink.done;
171 } 172 }
172 173
173 class StdioType { 174 class StdioType {
174 static const StdioType TERMINAL = const StdioType._("terminal"); 175 static const StdioType TERMINAL = const StdioType._("terminal");
175 static const StdioType PIPE = const StdioType._("pipe"); 176 static const StdioType PIPE = const StdioType._("pipe");
176 static const StdioType FILE = const StdioType._("file"); 177 static const StdioType FILE = const StdioType._("file");
177 static const StdioType OTHER = const StdioType._("other"); 178 static const StdioType OTHER = const StdioType._("other");
178 final String name; 179 final String name;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 238 }
238 return StdioType.OTHER; 239 return StdioType.OTHER;
239 } 240 }
240 241
241 242
242 class _StdIOUtils { 243 class _StdIOUtils {
243 external static IOSink _getStdioOutputStream(int fd); 244 external static IOSink _getStdioOutputStream(int fd);
244 external static Stdin _getStdioInputStream(); 245 external static Stdin _getStdioInputStream();
245 external static int _socketType(nativeSocket); 246 external static int _socketType(nativeSocket);
246 } 247 }
OLDNEW
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | tests/standalone/io/io_sink_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698