/
io_patch.dart
707 lines (596 loc) · 16.1 KB
/
io_patch.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:_js_helper' show patch;
import 'dart:_internal' hide Symbol;
import 'dart:async';
import 'dart:convert';
import 'dart:isolate';
import 'dart:typed_data';
@patch
class _Directory {
@patch
static _current(_Namespace namespace) {
throw new UnsupportedError("Directory._current");
}
@patch
static _setCurrent(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("Directory_SetCurrent");
}
@patch
static _createTemp(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("Directory._createTemp");
}
@patch
static String _systemTemp(_Namespace namespace) {
throw new UnsupportedError("Directory._systemTemp");
}
@patch
static _exists(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("Directory._exists");
}
@patch
static _create(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("Directory._create");
}
@patch
static _deleteNative(_Namespace namespace, Uint8List path, bool recursive) {
throw new UnsupportedError("Directory._deleteNative");
}
@patch
static _rename(_Namespace namespace, Uint8List path, String newPath) {
throw new UnsupportedError("Directory._rename");
}
@patch
static void _fillWithDirectoryListing(
_Namespace namespace,
List<FileSystemEntity> list,
Uint8List path,
bool recursive,
bool followLinks) {
throw new UnsupportedError("Directory._fillWithDirectoryListing");
}
}
@patch
class _AsyncDirectoryListerOps {
@patch
factory _AsyncDirectoryListerOps(int pointer) {
throw new UnsupportedError("Directory._list");
}
}
@patch
class _EventHandler {
@patch
static void _sendData(Object? sender, SendPort sendPort, int data) {
throw new UnsupportedError("EventHandler._sendData");
}
}
@patch
class FileStat {
@patch
static _statSync(_Namespace namespace, String path) {
throw new UnsupportedError("FileStat.stat");
}
}
@patch
class FileSystemEntity {
@patch
static _getTypeNative(
_Namespace namespace, Uint8List path, bool followLinks) {
throw new UnsupportedError("FileSystemEntity._getType");
}
@patch
static _identicalNative(_Namespace namespace, String path1, String path2) {
throw new UnsupportedError("FileSystemEntity._identical");
}
@patch
static _resolveSymbolicLinks(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("FileSystemEntity._resolveSymbolicLinks");
}
}
@patch
class _File {
@patch
static _exists(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._exists");
}
@patch
static _create(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._create");
}
@patch
static _createLink(_Namespace namespace, Uint8List path, String target) {
throw new UnsupportedError("File._createLink");
}
@patch
static _linkTarget(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._linkTarget");
}
@patch
static _deleteNative(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._deleteNative");
}
@patch
static _deleteLinkNative(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._deleteLinkNative");
}
@patch
static _rename(_Namespace namespace, Uint8List oldPath, String newPath) {
throw new UnsupportedError("File._rename");
}
@patch
static _renameLink(_Namespace namespace, Uint8List oldPath, String newPath) {
throw new UnsupportedError("File._renameLink");
}
@patch
static _copy(_Namespace namespace, Uint8List oldPath, String newPath) {
throw new UnsupportedError("File._copy");
}
@patch
static _lengthFromPath(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._lengthFromPath");
}
@patch
static _lastModified(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._lastModified");
}
@patch
static _lastAccessed(_Namespace namespace, Uint8List path) {
throw new UnsupportedError("File._lastAccessed");
}
@patch
static _setLastModified(_Namespace namespace, Uint8List path, int millis) {
throw new UnsupportedError("File._setLastModified");
}
@patch
static _setLastAccessed(_Namespace namespace, Uint8List path, int millis) {
throw new UnsupportedError("File._setLastAccessed");
}
@patch
static _open(_Namespace namespace, Uint8List path, int mode) {
throw new UnsupportedError("File._open");
}
@patch
static int _openStdio(int fd) {
throw new UnsupportedError("File._openStdio");
}
}
@patch
class _Namespace {
@patch
static void _setupNamespace(var namespace) {
throw new UnsupportedError("_Namespace");
}
@patch
static _Namespace get _namespace {
throw new UnsupportedError("_Namespace");
}
@patch
static int get _namespacePointer {
throw new UnsupportedError("_Namespace");
}
}
@patch
class _RandomAccessFileOps {
@patch
factory _RandomAccessFileOps(int pointer) {
throw new UnsupportedError("RandomAccessFile");
}
}
@patch
bool _isDirectIOCapableTypedList(List<int> buffer) {
return buffer is Uint8List || buffer is Int8List;
}
@patch
class _IOCrypto {
@patch
static Uint8List getRandomBytes(int count) {
throw new UnsupportedError("_IOCrypto.getRandomBytes");
}
}
@patch
class _Platform {
@patch
static int _numberOfProcessors() {
throw new UnsupportedError("Platform._numberOfProcessors");
}
@patch
static String _pathSeparator() {
throw new UnsupportedError("Platform._pathSeparator");
}
@patch
static String _operatingSystem() {
throw new UnsupportedError("Platform._operatingSystem");
}
@patch
static _operatingSystemVersion() {
throw new UnsupportedError("Platform._operatingSystemVersion");
}
@patch
static _localHostname() {
throw new UnsupportedError("Platform._localHostname");
}
@patch
static _executable() {
throw new UnsupportedError("Platform._executable");
}
@patch
static _resolvedExecutable() {
throw new UnsupportedError("Platform._resolvedExecutable");
}
@patch
static List<String> _executableArguments() {
throw new UnsupportedError("Platform._executableArguments");
}
@patch
static String _packageRoot() {
throw new UnsupportedError("Platform._packageRoot");
}
@patch
static String _packageConfig() {
throw new UnsupportedError("Platform._packageConfig");
}
@patch
static _environment() {
throw new UnsupportedError("Platform._environment");
}
@patch
static String _version() {
throw new UnsupportedError("Platform._version");
}
@patch
static String _localeName() {
throw new UnsupportedError("Platform._localeName");
}
@patch
static Uri _script() {
throw new UnsupportedError("Platform._script");
}
}
@patch
class _ProcessUtils {
@patch
static Never _exit(int status) {
throw new UnsupportedError("ProcessUtils._exit");
}
@patch
static void _setExitCode(int status) {
throw new UnsupportedError("ProcessUtils._setExitCode");
}
@patch
static int _getExitCode() {
throw new UnsupportedError("ProcessUtils._getExitCode");
}
@patch
static void _sleep(int millis) {
throw new UnsupportedError("ProcessUtils._sleep");
}
@patch
static int _pid(Process? process) {
throw new UnsupportedError("ProcessUtils._pid");
}
@patch
static Stream<ProcessSignal> _watchSignal(ProcessSignal signal) {
throw new UnsupportedError("ProcessUtils._watchSignal");
}
}
@patch
class ProcessInfo {
@patch
static int get currentRss {
throw new UnsupportedError("ProcessInfo.currentRss");
}
@patch
static int get maxRss {
throw new UnsupportedError("ProcessInfo.maxRss");
}
}
@patch
class Process {
@patch
static Future<Process> start(String executable, List<String> arguments,
{String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment: true,
bool runInShell: false,
ProcessStartMode mode: ProcessStartMode.normal}) {
throw new UnsupportedError("Process.start");
}
@patch
static Future<ProcessResult> run(String executable, List<String> arguments,
{String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment: true,
bool runInShell: false,
Encoding stdoutEncoding: systemEncoding,
Encoding stderrEncoding: systemEncoding}) {
throw new UnsupportedError("Process.run");
}
@patch
static ProcessResult runSync(String executable, List<String> arguments,
{String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment: true,
bool runInShell: false,
Encoding stdoutEncoding: systemEncoding,
Encoding stderrEncoding: systemEncoding}) {
throw new UnsupportedError("Process.runSync");
}
@patch
static bool killPid(int pid, [ProcessSignal signal = ProcessSignal.sigterm]) {
throw new UnsupportedError("Process.killPid");
}
}
@patch
class InternetAddress {
@patch
static InternetAddress get LOOPBACK_IP_V4 {
throw new UnsupportedError("InternetAddress.LOOPBACK_IP_V4");
}
@patch
static InternetAddress get LOOPBACK_IP_V6 {
throw new UnsupportedError("InternetAddress.LOOPBACK_IP_V6");
}
@patch
static InternetAddress get ANY_IP_V4 {
throw new UnsupportedError("InternetAddress.ANY_IP_V4");
}
@patch
static InternetAddress get ANY_IP_V6 {
throw new UnsupportedError("InternetAddress.ANY_IP_V6");
}
@patch
factory InternetAddress(String address, {InternetAddressType? type}) {
throw new UnsupportedError("InternetAddress");
}
@patch
factory InternetAddress.fromRawAddress(Uint8List rawAddress,
{InternetAddressType? type}) {
throw new UnsupportedError("InternetAddress.fromRawAddress");
}
@patch
static Future<List<InternetAddress>> lookup(String host,
{InternetAddressType type: InternetAddressType.any}) {
throw new UnsupportedError("InternetAddress.lookup");
}
@patch
static InternetAddress _cloneWithNewHost(
InternetAddress address, String host) {
throw new UnsupportedError("InternetAddress._cloneWithNewHost");
}
@patch
static InternetAddress? tryParse(String address) {
throw UnsupportedError("InternetAddress.tryParse");
}
}
@patch
class NetworkInterface {
@patch
static bool get listSupported {
throw new UnsupportedError("NetworkInterface.listSupported");
}
@patch
static Future<List<NetworkInterface>> list(
{bool includeLoopback: false,
bool includeLinkLocal: false,
InternetAddressType type: InternetAddressType.any}) {
throw new UnsupportedError("NetworkInterface.list");
}
}
@patch
class RawServerSocket {
@patch
static Future<RawServerSocket> bind(address, int port,
{int backlog: 0, bool v6Only: false, bool shared: false}) {
throw new UnsupportedError("RawServerSocket.bind");
}
}
@patch
class ServerSocket {
@patch
static Future<ServerSocket> _bind(address, int port,
{int backlog: 0, bool v6Only: false, bool shared: false}) {
throw new UnsupportedError("ServerSocket.bind");
}
}
@patch
class RawSocket {
@patch
static Future<RawSocket> connect(dynamic host, int port,
{dynamic sourceAddress, Duration? timeout}) {
throw new UnsupportedError("RawSocket constructor");
}
@patch
static Future<ConnectionTask<RawSocket>> startConnect(dynamic host, int port,
{dynamic sourceAddress}) {
throw new UnsupportedError("RawSocket constructor");
}
}
@patch
class Socket {
@patch
static Future<Socket> _connect(dynamic host, int port,
{dynamic sourceAddress, Duration? timeout}) {
throw new UnsupportedError("Socket constructor");
}
@patch
static Future<ConnectionTask<Socket>> _startConnect(dynamic host, int port,
{dynamic sourceAddress}) {
throw new UnsupportedError("Socket constructor");
}
}
@patch
class SecureSocket {
@patch
factory SecureSocket._(RawSecureSocket rawSocket) {
throw new UnsupportedError("SecureSocket constructor");
}
}
@patch
class RawSynchronousSocket {
@patch
static RawSynchronousSocket connectSync(dynamic host, int port) {
throw new UnsupportedError("RawSynchronousSocket.connectSync");
}
}
@patch
class RawSocketOption {
@patch
static int _getOptionValue(int key) {
throw UnsupportedError("RawSocketOption._getOptionValue");
}
}
@patch
class SecurityContext {
@patch
factory SecurityContext({bool withTrustedRoots: false}) {
throw new UnsupportedError("SecurityContext constructor");
}
@patch
static SecurityContext get defaultContext {
throw new UnsupportedError("default SecurityContext getter");
}
@patch
static bool get alpnSupported {
throw new UnsupportedError("SecurityContext alpnSupported getter");
}
}
@patch
class X509Certificate {
@patch
factory X509Certificate._() {
throw new UnsupportedError("X509Certificate constructor");
}
}
@patch
class RawDatagramSocket {
@patch
static Future<RawDatagramSocket> bind(dynamic host, int port,
{bool reuseAddress: true, bool reusePort: false, int ttl: 1}) {
throw new UnsupportedError("RawDatagramSocket.bind");
}
}
@patch
class _SecureFilter {
@patch
factory _SecureFilter._() {
throw new UnsupportedError("_SecureFilter._SecureFilter");
}
}
@patch
class _StdIOUtils {
@patch
static Stdin _getStdioInputStream(int fd) {
throw new UnsupportedError("StdIOUtils._getStdioInputStream");
}
@patch
static _getStdioOutputStream(int fd) {
throw new UnsupportedError("StdIOUtils._getStdioOutputStream");
}
@patch
static int _socketType(Socket socket) {
throw new UnsupportedError("StdIOUtils._socketType");
}
@patch
static _getStdioHandleType(int fd) {
throw new UnsupportedError("StdIOUtils._getStdioHandleType");
}
}
@patch
class _WindowsCodePageDecoder {
@patch
static String _decodeBytes(List<int> bytes) {
throw new UnsupportedError("_WindowsCodePageDecoder._decodeBytes");
}
}
@patch
class _WindowsCodePageEncoder {
@patch
static List<int> _encodeString(String string) {
throw new UnsupportedError("_WindowsCodePageEncoder._encodeString");
}
}
@patch
class RawZLibFilter {
@patch
static RawZLibFilter _makeZLibDeflateFilter(
bool gzip,
int level,
int windowBits,
int memLevel,
int strategy,
List<int>? dictionary,
bool raw) {
throw new UnsupportedError("_newZLibDeflateFilter");
}
@patch
static RawZLibFilter _makeZLibInflateFilter(
int windowBits, List<int>? dictionary, bool raw) {
throw new UnsupportedError("_newZLibInflateFilter");
}
}
@patch
class Stdin {
@patch
int readByteSync() {
throw new UnsupportedError("Stdin.readByteSync");
}
@patch
bool get echoMode {
throw new UnsupportedError("Stdin.echoMode");
}
@patch
void set echoMode(bool enabled) {
throw new UnsupportedError("Stdin.echoMode");
}
@patch
bool get lineMode {
throw new UnsupportedError("Stdin.lineMode");
}
@patch
void set lineMode(bool enabled) {
throw new UnsupportedError("Stdin.lineMode");
}
@patch
bool get supportsAnsiEscapes {
throw new UnsupportedError("Stdin.supportsAnsiEscapes");
}
}
@patch
class Stdout {
@patch
bool _hasTerminal(int fd) {
throw new UnsupportedError("Stdout.hasTerminal");
}
@patch
int _terminalColumns(int fd) {
throw new UnsupportedError("Stdout.terminalColumns");
}
@patch
int _terminalLines(int fd) {
throw new UnsupportedError("Stdout.terminalLines");
}
@patch
static bool _supportsAnsiEscapes(int fd) {
throw new UnsupportedError("Stdout.supportsAnsiEscapes");
}
}
@patch
class _FileSystemWatcher {
@patch
static Stream<FileSystemEvent> _watch(
String path, int events, bool recursive) {
throw new UnsupportedError("_FileSystemWatcher.watch");
}
@patch
static bool get isSupported {
throw new UnsupportedError("_FileSystemWatcher.isSupported");
}
}
@patch
class _IOService {
@patch
static Future _dispatch(int request, List data) {
throw new UnsupportedError("_IOService._dispatch");
}
}