| Index: runtime/bin/file_impl.dart
|
| diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart
|
| index 4533633e7556d92159ff51e0565b4b2c5f706d23..38bfadd18e581cc3fb16f143e75a339eef50afca 100644
|
| --- a/runtime/bin/file_impl.dart
|
| +++ b/runtime/bin/file_impl.dart
|
| @@ -73,9 +73,36 @@ class _FileOutputStream implements FileOutputStream {
|
| _file.openSync(true);
|
| }
|
|
|
| - bool write(List<int> buffer, int offset, int len, void callback()) {
|
| - int bytesWritten = _file.writeListSync(buffer, offset, len);
|
| + bool write(List<int> buffer) {
|
| + return _write(buffer, 0, buffer.length);
|
| + }
|
| +
|
| + bool writeFrom(List<int> buffer, [int offset, int len]) {
|
| + return _write(buffer, offset, (len == null) ? buffer.length : len);
|
| + }
|
| +
|
| + void end() {
|
| + _file.closeSync();
|
| + }
|
| +
|
| + void close() {
|
| + _file.closeSync();
|
| + }
|
| +
|
| + void set noPendingWriteHandler(void callback()) {
|
| + // TODO(sgjesse): How to handle this?
|
| + }
|
|
|
| + void set closeHandler(void callback()) {
|
| + // TODO(sgjesse): How to handle this?
|
| + }
|
| +
|
| + void set errorHandler(void callback()) {
|
| + // TODO(sgjesse): How to handle this?
|
| + }
|
| +
|
| + bool _write(List<int> buffer, int offset, int len) {
|
| + int bytesWritten = _file.writeListSync(buffer, offset, len);
|
| if (bytesWritten == len) {
|
| return true;
|
| } else {
|
| @@ -83,10 +110,6 @@ class _FileOutputStream implements FileOutputStream {
|
| }
|
| }
|
|
|
| - void close() {
|
| - _file.closeSync();
|
| - }
|
| -
|
| File _file;
|
| }
|
|
|
|
|