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

Unified Diff: pkg/front_end/lib/src/fasta/io.dart

Issue 2804973002: Missing file from CL 2804843003. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/io.dart
diff --git a/pkg/front_end/lib/src/fasta/io.dart b/pkg/front_end/lib/src/fasta/io.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6c8eb9dc74eb1134fea748d5d643012f8bd11c34
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/io.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2017, 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.
+
+library fasta.io;
+
+import 'dart:async' show Future;
+
+import 'dart:io' show FileSystemException;
+
+import 'errors.dart' show inputError;
+
+import 'scanner/io.dart' as scanner_io show readBytesFromFile;
+
+Future<List<int>> readBytesFromFile(Uri uri) async {
+ try {
+ return await scanner_io.readBytesFromFile(uri);
+ } on FileSystemException catch (e) {
+ String message = e.message;
+ String osMessage = e.osError?.message;
+ if (osMessage != null && osMessage.isNotEmpty) {
+ message = osMessage;
+ }
+ return inputError(uri, -1, message);
+ }
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698