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

Side by Side Diff: pkg/pathos/lib/path.dart

Issue 16854005: First pass at build dependency graph for barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle unprovided sources and errors a bit better. Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/test/utils.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /// A comprehensive, cross-platform path manipulation library. 5 /// A comprehensive, cross-platform path manipulation library.
6 /// 6 ///
7 /// ## Installing ## 7 /// ## Installing ##
8 /// 8 ///
9 /// Use [pub][] to install this package. Add the following to your 9 /// Use [pub][] to install this package. Add the following to your
10 /// `pubspec.yaml` file. 10 /// `pubspec.yaml` file.
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 /// URLs that start with `/` are known as "root-relative", since they're 468 /// URLs that start with `/` are known as "root-relative", since they're
469 /// relative to the root of the current URL. Since root-relative paths are 469 /// relative to the root of the current URL. Since root-relative paths are
470 /// still absolute in every other sense, [isAbsolute] will return true for 470 /// still absolute in every other sense, [isAbsolute] will return true for
471 /// them. They can be detected using [isRootRelative]. 471 /// them. They can be detected using [isRootRelative].
472 bool isAbsolute(String path) => _parse(path).isAbsolute; 472 bool isAbsolute(String path) => _parse(path).isAbsolute;
473 473
474 /// Returns `true` if [path] is a relative path and `false` if it is absolute. 474 /// Returns `true` if [path] is a relative path and `false` if it is absolute.
475 /// On POSIX systems, absolute paths start with a `/` (forward slash). On 475 /// On POSIX systems, absolute paths start with a `/` (forward slash). On
476 /// Windows, an absolute path starts with `\\`, or a drive letter followed by 476 /// Windows, an absolute path starts with `\\`, or a drive letter followed by
477 /// `:/` or `:\`. 477 /// `:/` or `:\`.
478 bool isRelative(String path) => !isAbsolute(path); 478 bool isRelative(String path) => !this.isAbsolute(path);
479 479
480 /// Returns `true` if [path] is a root-relative path and `false` if it's not. 480 /// Returns `true` if [path] is a root-relative path and `false` if it's not.
481 /// 481 ///
482 /// URLs that start with `/` are known as "root-relative", since they're 482 /// URLs that start with `/` are known as "root-relative", since they're
483 /// relative to the root of the current URL. Since root-relative paths are 483 /// relative to the root of the current URL. Since root-relative paths are
484 /// still absolute in every other sense, [isAbsolute] will return true for 484 /// still absolute in every other sense, [isAbsolute] will return true for
485 /// them. They can be detected using [isRootRelative]. 485 /// them. They can be detected using [isRootRelative].
486 /// 486 ///
487 /// No POSIX and Windows paths are root-relative. 487 /// No POSIX and Windows paths are root-relative.
488 bool isRootRelative(String path) => _parse(path).isRootRelative; 488 bool isRootRelative(String path) => _parse(path).isRootRelative;
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 // doesn't count. 1132 // doesn't count.
1133 if (lastDot <= 0) return [file, '']; 1133 if (lastDot <= 0) return [file, ''];
1134 1134
1135 return [file.substring(0, lastDot), file.substring(lastDot)]; 1135 return [file.substring(0, lastDot), file.substring(lastDot)];
1136 } 1136 }
1137 1137
1138 _ParsedPath clone() => new _ParsedPath( 1138 _ParsedPath clone() => new _ParsedPath(
1139 style, root, isRootRelative, 1139 style, root, isRootRelative,
1140 new List.from(parts), new List.from(separators)); 1140 new List.from(parts), new List.from(separators));
1141 } 1141 }
OLDNEW
« no previous file with comments | « pkg/barback/test/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698