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

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

Issue 2490023003: Add File.lengthSync to use it for FileByteStore eviction. (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/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 a9cf94b99734395d41127df071264e0c23f075f3..411d0d1a6d9961a54502e8588993cb62c1ec2a8f 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -127,6 +127,15 @@ class _PhysicalFile extends _PhysicalResource implements File {
Stream<WatchEvent> get changes => new FileWatcher(_entry.path).events;
@override
+ int get lengthSync {
+ try {
+ return _file.lengthSync();
+ } on io.FileSystemException catch (exception) {
+ throw new FileSystemException(exception.path, exception.message);
+ }
+ }
+
+ @override
int get modificationStamp {
try {
return _file.lastModifiedSync().millisecondsSinceEpoch;
« 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