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

Unified Diff: pkg/front_end/lib/file_system.dart

Issue 2471283002: Add implementations of the front end FileSystem API. (Closed)
Patch Set: Created 4 years, 1 month 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/front_end/lib/file_system.dart
diff --git a/pkg/front_end/lib/file_system.dart b/pkg/front_end/lib/file_system.dart
index 404f7f617eca8a3e9de1ef2f1b82e841bf1aabd4..cadf82fddf40b6058e3e18975b86f9a954730cfd 100644
--- a/pkg/front_end/lib/file_system.dart
+++ b/pkg/front_end/lib/file_system.dart
@@ -31,10 +31,9 @@ abstract class FileSystem {
/// Returns a [FileSystemEntity] corresponding to the given [uri].
///
- /// Uses of `..` and `.` in the URI are normalized before returning. Relative
- /// paths are also converted to absolute paths.
+ /// Uses of `..` and `.` in the URI are normalized before returning.
///
- /// If [uri] is not a `file:` URI, an [Error] will be thrown.
+ /// If [uri] is not an absolute `file:` URI, an [Error] will be thrown.
///
/// Does not check whether a file or folder exists at the given location.
FileSystemEntity entityForUri(Uri uri);
@@ -42,6 +41,9 @@ abstract class FileSystem {
/// Abstract representation of a file system entity that may or may not exist.
///
+/// Instances of this class have suitable implementations of equality tests and
+/// hashCode.
+///
/// Not intended to be implemented or extended by clients.
abstract class FileSystemEntity {
/// Returns the absolute normalized path represented by this file system
@@ -67,7 +69,7 @@ abstract class FileSystemEntity {
/// The file is assumed to be UTF-8 encoded.
///
/// If an error occurs while attempting to read the file (e.g. because no such
- /// file exists, or the entity is a directory), the future is completed with
- /// an [Exception].
+ /// file exists, the entity is a directory, or the file is not valid UTF-8),
+ /// the future is completed with an [Exception].
Future<String> readAsString();
}

Powered by Google App Engine
This is Rietveld 408576698