| Index: pkg/analyzer/lib/file_system/physical_file_system.dart
|
| diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
|
| index cdfa9a6f4e5efaa656029ec8501158c1e4b27d12..1a4e7939296aba1a74a535b01c0e8dc4008f6bc3 100644
|
| --- a/pkg/analyzer/lib/file_system/physical_file_system.dart
|
| +++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
|
| @@ -19,8 +19,8 @@ import 'package:watcher/watcher.dart';
|
| * A `dart:io` based implementation of [ResourceProvider].
|
| */
|
| class PhysicalResourceProvider implements ResourceProvider {
|
| - static final NORMALIZE_EOL_ALWAYS = (String string) =>
|
| - string.replaceAll(new RegExp('\r\n?'), '\n');
|
| + static final NORMALIZE_EOL_ALWAYS =
|
| + (String string) => string.replaceAll(new RegExp('\r\n?'), '\n');
|
|
|
| static final PhysicalResourceProvider INSTANCE =
|
| new PhysicalResourceProvider(null);
|
| @@ -112,6 +112,16 @@ class _PhysicalFile extends _PhysicalResource implements File {
|
| }
|
|
|
| @override
|
| + List<int> readAsBytesSync() {
|
| + try {
|
| + io.File file = _entry as io.File;
|
| + return file.readAsBytesSync();
|
| + } on io.FileSystemException catch (exception) {
|
| + throw new FileSystemException(exception.path, exception.message);
|
| + }
|
| + }
|
| +
|
| + @override
|
| String readAsStringSync() {
|
| try {
|
| io.File file = _entry as io.File;
|
| @@ -120,6 +130,16 @@ class _PhysicalFile extends _PhysicalResource implements File {
|
| throw new FileSystemException(exception.path, exception.message);
|
| }
|
| }
|
| +
|
| + @override
|
| + void writeAsBytesSync(List<int> bytes) {
|
| + try {
|
| + io.File file = _entry as io.File;
|
| + file.writeAsBytesSync(bytes);
|
| + } on io.FileSystemException catch (exception) {
|
| + throw new FileSystemException(exception.path, exception.message);
|
| + }
|
| + }
|
| }
|
|
|
| /**
|
|
|