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

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

Issue 2165843002: Add a toUri method to Resource (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added tests Created 4 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
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 7a641f16f619251229316ecf67042884dc865471..8b8618e2a16a68bd5420ca20ffb25467b9a956ff 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -179,6 +179,9 @@ class _PhysicalFile extends _PhysicalResource implements File {
}
@override
+ Uri toUri() => new Uri.file(path);
+
+ @override
void writeAsBytesSync(List<int> bytes) {
try {
io.File file = _entry as io.File;
@@ -256,6 +259,9 @@ class _PhysicalFolder extends _PhysicalResource implements Folder {
}
return contains(path);
}
+
+ @override
+ Uri toUri() => new Uri.directory(path);
}
/**
« 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