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

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

Issue 2850533004: Revert "Extend file-system abstraction with a couple methods, remove context." (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 | pkg/front_end/lib/kernel_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0afb39e7a7b72fd7fc812b50da4879f82ffb4364..6e57c266c067bdd9b731335abc37ece3bfa672ec 100644
--- a/pkg/front_end/lib/file_system.dart
+++ b/pkg/front_end/lib/file_system.dart
@@ -6,6 +6,8 @@ library front_end.file_system;
import 'dart:async';
+import 'package:path/path.dart' as path;
+
/// Abstract interface to file system operations.
///
/// All front end interaction with the file system goes through this interface;
@@ -15,6 +17,12 @@ import 'dart:async';
///
/// Not intended to be implemented or extended by clients.
abstract class FileSystem {
+ /// Returns a path context suitable for use with this [FileSystem].
+ ///
+ /// TODO(paulberry): try to eliminate all usages of this. Since the
+ /// FileSystem API now uses URIs rather than paths, it should not be needed.
+ path.Context get context;
+
/// Returns a [FileSystemEntity] corresponding to the given [uri].
///
/// Uses of `..` and `.` in the URI are normalized before returning.
@@ -33,7 +41,8 @@ abstract class FileSystem {
///
/// Not intended to be implemented or extended by clients.
abstract class FileSystemEntity {
- /// The absolute normalized URI represented by this file system entity.
+ /// Returns the absolute normalized URI represented by this file system
+ /// entity.
///
/// Note: this is not necessarily the same as the URI that was passed to
/// [FileSystem.entityForUri], since the URI might have been normalized.
@@ -56,12 +65,4 @@ abstract class FileSystemEntity {
/// 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();
-
- /// Whether this file system entity exists.
- Future<bool> exists();
-
- /// Extracts the last-modification time of the file system entity, if it
- /// exists and it is a file, otherwise the future is completed with an
- /// [Exception].
- Future<DateTime> lastModified();
}
« no previous file with comments | « no previous file | pkg/front_end/lib/kernel_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698