| OLD | NEW |
| 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 library descriptor.tar; | 5 library descriptor.tar; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import 'package:pathos/path.dart' as path; | 10 import 'package:pathos/path.dart' as path; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 var file = path.join(parent, name); | 35 var file = path.join(parent, name); |
| 36 writeBinaryFile(file, bytes); | 36 writeBinaryFile(file, bytes); |
| 37 return file; | 37 return file; |
| 38 }); | 38 }); |
| 39 }); | 39 }); |
| 40 }, 'creating tar file:\n${describe()}'); | 40 }, 'creating tar file:\n${describe()}'); |
| 41 | 41 |
| 42 /// Validates that the `.tar.gz` file at [path] contains the expected | 42 /// Validates that the `.tar.gz` file at [path] contains the expected |
| 43 /// contents. | 43 /// contents. |
| 44 Future validate([String parent]) { | 44 Future validate([String parent]) { |
| 45 throw "TODO(nweiz): implement this"; | 45 throw new UnimplementedError("TODO(nweiz): implement this"); |
| 46 } | 46 } |
| 47 | 47 |
| 48 Stream<List<int>> read() { | 48 Stream<List<int>> read() { |
| 49 return new Stream<List<int>>.fromFuture(withTempDir((tempDir) { | 49 return new Stream<List<int>>.fromFuture(withTempDir((tempDir) { |
| 50 return create(tempDir).then((_) => | 50 return create(tempDir).then((_) => |
| 51 readBinaryFile(path.join(tempDir, name))); | 51 readBinaryFile(path.join(tempDir, name))); |
| 52 })); | 52 })); |
| 53 } | 53 } |
| 54 } | 54 } |
| OLD | NEW |