Chromium Code Reviews| Index: pkg/path/lib/src/style/posix.dart |
| diff --git a/pkg/path/lib/src/style/posix.dart b/pkg/path/lib/src/style/posix.dart |
| index e0b601743c743b829aa817fc5721e3128cadb9a9..8067fad74a4ccddb3631ae16b007061568269a13 100644 |
| --- a/pkg/path/lib/src/style/posix.dart |
| +++ b/pkg/path/lib/src/style/posix.dart |
| @@ -13,9 +13,24 @@ class PosixStyle extends InternalStyle { |
| final name = 'posix'; |
| final separator = '/'; |
| + final separators = const ['/']; |
| + |
| + // Deprecated properties. |
| + |
| final separatorPattern = new RegExp(r'/'); |
| final needsSeparatorPattern = new RegExp(r'[^/]$'); |
| final rootPattern = new RegExp(r'^/'); |
| + final relativeRootPattern = null; |
| + |
| + bool needsSeparator(String path) => |
| + !path.isEmpty && path.codeUnitAt(path.length - 1) != 0x2f; // "/" |
|
Bob Nystrom
2014/06/02 22:43:05
!path.isEmpty -> path.isNotEmpty
and elsewhere.
nweiz
2014/06/02 23:13:25
Done.
|
| + |
| + String getRoot(String path) { |
| + if (!path.isEmpty && path.codeUnitAt(0) == 0x2f) return '/'; |
| + return null; |
| + } |
| + |
| + String getRelativeRoot(String path) => null; |
| String pathFromUri(Uri uri) { |
| if (uri.scheme == '' || uri.scheme == 'file') { |