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

Unified Diff: pkg/path/lib/src/style/posix.dart

Issue 439223002: Add InternalStyle:rootLength to implement isAbsolute and rootPrefix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add windows test to 'document' \\server root prefix. 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
« no previous file with comments | « pkg/path/lib/src/parsed_path.dart ('k') | pkg/path/lib/src/style/url.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b8b82b406d33f31a08d5c4a05c67b86dbdbc4b2f..74aeb4c5381e2af897257934802caf34047ca499 100644
--- a/pkg/path/lib/src/style/posix.dart
+++ b/pkg/path/lib/src/style/posix.dart
@@ -30,11 +30,13 @@ class PosixStyle extends InternalStyle {
bool needsSeparator(String path) =>
path.isNotEmpty && !isSeparator(path.codeUnitAt(path.length - 1));
- String getRoot(String path) {
- if (path.isNotEmpty && isSeparator(path.codeUnitAt(0))) return '/';
- return null;
+ int rootLength(String path) {
+ if (path.isNotEmpty && isSeparator(path.codeUnitAt(0))) return 1;
+ return 0;
}
+ bool isRootRelative(String path) => false;
+
String getRelativeRoot(String path) => null;
String pathFromUri(Uri uri) {
« no previous file with comments | « pkg/path/lib/src/parsed_path.dart ('k') | pkg/path/lib/src/style/url.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698