OLD | NEW |
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 /// Helper functionality to make working with IO easier. | 5 /// Helper functionality to make working with IO easier. |
6 library io; | 6 library io; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
11 import 'dart:json'; | 11 import 'dart:json'; |
12 import 'dart:uri'; | 12 import 'dart:uri'; |
13 | 13 |
14 import '../../pkg/path/lib/path.dart' as path; | 14 import '../../pkg/pathos/lib/path.dart' as path; |
15 import '../../pkg/http/lib/http.dart' show ByteStream; | 15 import '../../pkg/http/lib/http.dart' show ByteStream; |
16 import 'error_group.dart'; | 16 import 'error_group.dart'; |
17 import 'exit_codes.dart' as exit_codes; | 17 import 'exit_codes.dart' as exit_codes; |
18 import 'log.dart' as log; | 18 import 'log.dart' as log; |
19 import 'utils.dart'; | 19 import 'utils.dart'; |
20 | 20 |
21 export '../../pkg/http/lib/http.dart' show ByteStream; | 21 export '../../pkg/http/lib/http.dart' show ByteStream; |
22 | 22 |
23 final NEWLINE_PATTERN = new RegExp("\r\n?|\n\r?"); | 23 final NEWLINE_PATTERN = new RegExp("\r\n?|\n\r?"); |
24 | 24 |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 const PubProcessResult(this.stdout, this.stderr, this.exitCode); | 804 const PubProcessResult(this.stdout, this.stderr, this.exitCode); |
805 | 805 |
806 bool get success => exitCode == 0; | 806 bool get success => exitCode == 0; |
807 } | 807 } |
808 | 808 |
809 /// Gets a [Uri] for [uri], which can either already be one, or be a [String]. | 809 /// Gets a [Uri] for [uri], which can either already be one, or be a [String]. |
810 Uri _getUri(uri) { | 810 Uri _getUri(uri) { |
811 if (uri is Uri) return uri; | 811 if (uri is Uri) return uri; |
812 return Uri.parse(uri); | 812 return Uri.parse(uri); |
813 } | 813 } |
OLD | NEW |