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

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

Issue 2988443002: Remove FileSystem.lastModified (Closed)
Patch Set: Created 3 years, 5 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 | « pkg/front_end/lib/file_system.dart ('k') | pkg/front_end/lib/physical_file_system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/memory_file_system.dart
diff --git a/pkg/front_end/lib/memory_file_system.dart b/pkg/front_end/lib/memory_file_system.dart
index f53f24a8632bfe875f00a81f20e9cbb8d72520fd..b5515b77251149aeeb41a1ba10e4a53741d24b39 100644
--- a/pkg/front_end/lib/memory_file_system.dart
+++ b/pkg/front_end/lib/memory_file_system.dart
@@ -16,12 +16,6 @@ import 'file_system.dart';
/// Not intended to be implemented or extended by clients.
class MemoryFileSystem implements FileSystem {
final Map<Uri, Uint8List> _files = {};
- final Map<Uri, DateTime> _lastModified = {};
-
- // Counter used to create mock last-modification timestamps. The memory
- // file-system is mainly used for testing, so we use mock timestamps to avoid
- // introducing non-determinism.
- int _lastUpdate = 0;
/// The "current directory" in the in-memory virtual file system.
///
@@ -69,15 +63,6 @@ class MemoryFileSystemEntity implements FileSystemEntity {
@override
Future<bool> exists() async => _fileSystem._files[uri] != null;
- @override
- Future<DateTime> lastModified() async {
- var lastModified = _fileSystem._lastModified[uri];
- if (lastModified == null) {
- throw new FileSystemException(uri, 'File $uri does not exist.');
- }
- return lastModified;
- }
-
@override
Future<List<int>> readAsBytes() async {
List<int> contents = _fileSystem._files[uri];
@@ -120,7 +105,5 @@ class MemoryFileSystemEntity implements FileSystemEntity {
void _update(Uri uri, Uint8List data) {
_fileSystem._files[uri] = data;
- _fileSystem._lastModified[uri] =
- new DateTime.fromMicrosecondsSinceEpoch(++_fileSystem._lastUpdate);
}
}
« no previous file with comments | « pkg/front_end/lib/file_system.dart ('k') | pkg/front_end/lib/physical_file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698