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

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

Issue 444193002: Add Folder.contains(path) and use it in ContextDirectoryManager. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 e43ef033c70e0f230a145c1597e53a0192ad96b2..3b256a96382dbc6aac88bf7b3ddc3b4db0f7d857 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -73,6 +73,11 @@ class _PhysicalFolder extends _PhysicalResource implements Folder {
}
@override
+ bool contains(String path) {
+ return posix.isWithin(this.path, path);
+ }
+
+ @override
Resource getChild(String relPath) {
String canonicalPath = canonicalizePath(relPath);
return PhysicalResourceProvider.INSTANCE.getResource(canonicalPath);
« 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