Add RandomAccessMemory class for in-memory binary operations
This commit is contained in:
31
dart/lib/dev_tools/watch_dump.dart
Normal file
31
dart/lib/dev_tools/watch_dump.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'dart:io';
|
||||
import 'dart:async';
|
||||
import 'package:sweepstore/debug.dart';
|
||||
|
||||
void main() async {
|
||||
int refreshCount = 0;
|
||||
while (true) {
|
||||
// Clear console
|
||||
if (Platform.isWindows) {
|
||||
print(Process.runSync("cls", [], runInShell: true).stdout);
|
||||
} else {
|
||||
print(Process.runSync("clear", [], runInShell: true).stdout);
|
||||
}
|
||||
|
||||
refreshCount++;
|
||||
|
||||
// Read example.bin
|
||||
final file = File('example.bin');
|
||||
|
||||
if (await file.exists()) {
|
||||
final data = await file.readAsBytes();
|
||||
print('Binary dump of example.bin (${data.length} bytes) - Refresh #$refreshCount\n');
|
||||
print(binaryDump(data));
|
||||
print('\n--- Refreshing in 1 seconds ---');
|
||||
} else {
|
||||
print('Error: example.bin not found - Refresh #$refreshCount');
|
||||
}
|
||||
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user