| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library physical_file_system; | 5 library physical_file_system; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_io.dart'; | 10 import 'package:analyzer/src/generated/java_io.dart'; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 @override | 67 @override |
| 68 Stream<WatchEvent> get changes => new DirectoryWatcher(_entry.path).events; | 68 Stream<WatchEvent> get changes => new DirectoryWatcher(_entry.path).events; |
| 69 | 69 |
| 70 @override | 70 @override |
| 71 String canonicalizePath(String relPath) { | 71 String canonicalizePath(String relPath) { |
| 72 return normalize(join(_entry.absolute.path, relPath)); | 72 return normalize(join(_entry.absolute.path, relPath)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 @override | 75 @override |
| 76 bool contains(String path) { | 76 bool contains(String path) { |
| 77 return posix.isWithin(this.path, path); | 77 return isWithin(this.path, path); |
| 78 } | 78 } |
| 79 | 79 |
| 80 @override | 80 @override |
| 81 Resource getChild(String relPath) { | 81 Resource getChild(String relPath) { |
| 82 String canonicalPath = canonicalizePath(relPath); | 82 String canonicalPath = canonicalizePath(relPath); |
| 83 return PhysicalResourceProvider.INSTANCE.getResource(canonicalPath); | 83 return PhysicalResourceProvider.INSTANCE.getResource(canonicalPath); |
| 84 } | 84 } |
| 85 | 85 |
| 86 @override | 86 @override |
| 87 List<Resource> getChildren() { | 87 List<Resource> getChildren() { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 bool operator ==(other) { | 135 bool operator ==(other) { |
| 136 if (runtimeType != other.runtimeType) { | 136 if (runtimeType != other.runtimeType) { |
| 137 return false; | 137 return false; |
| 138 } | 138 } |
| 139 return path == other.path; | 139 return path == other.path; |
| 140 } | 140 } |
| 141 | 141 |
| 142 @override | 142 @override |
| 143 String toString() => path; | 143 String toString() => path; |
| 144 } | 144 } |
| OLD | NEW |