| 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 // This is a copy of the VM's dart:io library. This API is not usable | 5 // This is a copy of the VM's dart:io library. This API is not usable |
| 6 // when running inside a web browser. Nevertheless, Leg provides a | 6 // when running inside a web browser. Nevertheless, Leg provides a |
| 7 // mock version of the dart:io library so that it can statically | 7 // mock version of the dart:io library so that it can statically |
| 8 // analyze programs that use dart:io. | 8 // analyze programs that use dart:io. |
| 9 | 9 |
| 10 // TODO(ahe): Separate API from implementation details. | 10 // TODO(ahe): Separate API from implementation details. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Uses native keyword. | 49 // Uses native keyword. |
| 50 // #source('../../../runtime/bin/stdio.dart'); | 50 // #source('../../../runtime/bin/stdio.dart'); |
| 51 #source('../../../runtime/bin/timer.dart'); | 51 #source('../../../runtime/bin/timer.dart'); |
| 52 #source('../../../runtime/bin/timer_impl.dart'); | 52 #source('../../../runtime/bin/timer_impl.dart'); |
| 53 | 53 |
| 54 class _File implements File { | 54 class _File implements File { |
| 55 factory File(arg) { | 55 factory File(arg) { |
| 56 throw new UnsupportedOperationException('new File($arg)'); | 56 throw new UnsupportedOperationException('new File($arg)'); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 |
| 60 class _Platform implements Platform { |
| 61 factory Platform() { |
| 62 throw new UnsupportedOperationException('new Platform()'); |
| 63 } |
| 64 } |
| 65 |
| 66 class _Directory implements Directory { |
| 67 factory Directory(arg) { |
| 68 throw new UnsupportedOperationException('new Directory($arg)'); |
| 69 } |
| 70 } |
| 71 |
| 72 class _Process implements Process { |
| 73 factory Process.start(String executable, |
| 74 List<String> arguments, |
| 75 [String workingDirectory]) { |
| 76 var msg = 'new Process.start($executable, $arguments, $workingDirectory'; |
| 77 throw new UnsupportedOperationException(msg); |
| 78 } |
| 79 } |
| 80 |
| 81 class _Socket implements Socket { |
| 82 factory Socket(String host, int port) { |
| 83 throw new UnsupportedOperationException('new Socket($host, $int)'); |
| 84 } |
| 85 } |
| 86 |
| 87 class _EventHandler { |
| 88 factory _EventHandler() { |
| 89 throw new UnsupportedOperationException('new _EventHandler()'); |
| 90 } |
| 91 |
| 92 static void _start() { |
| 93 throw new UnsupportedOperationException('_EventHandler._start()'); |
| 94 } |
| 95 |
| 96 static _sendData(int id, ReceivePort receivePort, int data) { |
| 97 var msg = '_EventHandler._sendData($id, $receivePort, $data)'; |
| 98 throw new UnsupportedOperationException(msg); |
| 99 } |
| 100 |
| 101 static _EventHandler get _eventHandler() { |
| 102 throw new UnsupportedOperationException('_EventHandler._eventhandler'); |
| 103 } |
| 104 |
| 105 static void set _eventHandler(_EventHandler e) { |
| 106 throw new UnsupportedOperationException('_EventHandler._eventhandler = $e'); |
| 107 } |
| 108 } |
| OLD | NEW |