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

Unified Diff: sdk/lib/io/stdio.dart

Issue 65843003: Fill in more documentation blanks in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to reference standard IO stream 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/stdio.dart
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index 0865aaee7fd9e59df08a1f6a657e5bbc5ca753e4..b0e246d5e8c9853c60bbe8e1dbc60a00a5238a35 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -171,6 +171,7 @@ class _StdSink implements IOSink {
Future get done => _sink.done;
}
+/// The type of object a standard IO stream is attached to.
class StdioType {
static const StdioType TERMINAL = const StdioType._("terminal");
static const StdioType PIPE = const StdioType._("pipe");
@@ -187,6 +188,7 @@ IOSink _stdout;
IOSink _stderr;
+/// The standard input stream of data read by this program.
Stdin get stdin {
if (_stdin == null) {
_stdin = _StdIOUtils._getStdioInputStream();
@@ -195,6 +197,7 @@ Stdin get stdin {
}
+/// The standard output stream of data written by this program.
IOSink get stdout {
if (_stdout == null) {
_stdout = _StdIOUtils._getStdioOutputStream(1);
@@ -203,6 +206,7 @@ IOSink get stdout {
}
+/// The standard output stream of errors written by this program.
IOSink get stderr {
if (_stderr == null) {
_stderr = _StdIOUtils._getStdioOutputStream(2);
@@ -211,6 +215,8 @@ IOSink get stderr {
}
+/// For a stream, returns whether it is attached to a file, pipe, terminal, or
+/// something else.
StdioType stdioType(object) {
if (object is _StdStream) {
object = object._stream;
« no previous file with comments | « no previous file | sdk/lib/io/string_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698