Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: pkg/analyzer/lib/file_system/physical_file_system.dart

Issue 2265593002: Add writeAsStringSync (issue 27109) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Use UTF8 for conversion Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3b02335b012fd745a0c545662432a8dd6c61d10d..9b95ce8d98762285d24a1647c398181560a04f83 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -189,6 +189,16 @@ class _PhysicalFile extends _PhysicalResource implements File {
throw new FileSystemException(exception.path, exception.message);
}
}
+
+ @override
+ void writeAsStringSync(String content) {
+ try {
+ io.File file = _entry as io.File;
+ file.writeAsStringSync(content);
+ } on io.FileSystemException catch (exception) {
+ throw new FileSystemException(exception.path, exception.message);
+ }
+ }
}
/**
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/test/file_system/memory_file_system_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698