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

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: Revise. 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
« pkg/barback/test/utils.dart ('K') | « 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 /// URLs that start with `/` are known as "root-relative", since they're 429 /// URLs that start with `/` are known as "root-relative", since they're
430 /// relative to the root of the current URL. Since root-relative paths are 430 /// relative to the root of the current URL. Since root-relative paths are
431 /// still absolute in every other sense, [isAbsolute] will return true for 431 /// still absolute in every other sense, [isAbsolute] will return true for
432 /// them. They can be detected using [isRootRelative]. 432 /// them. They can be detected using [isRootRelative].
433 bool isAbsolute(String path) => _parse(path).isAbsolute; 433 bool isAbsolute(String path) => _parse(path).isAbsolute;
434 434
435 /// Returns `true` if [path] is a relative path and `false` if it is absolute. 435 /// Returns `true` if [path] is a relative path and `false` if it is absolute.
436 /// On POSIX systems, absolute paths start with a `/` (forward slash). On 436 /// On POSIX systems, absolute paths start with a `/` (forward slash). On
437 /// Windows, an absolute path starts with `\\`, or a drive letter followed by 437 /// Windows, an absolute path starts with `\\`, or a drive letter followed by
438 /// `:/` or `:\`. 438 /// `:/` or `:\`.
439 bool isRelative(String path) => !isAbsolute(path); 439 bool isRelative(String path) => !this.isAbsolute(path);
440 440
441 /// Returns `true` if [path] is a root-relative path and `false` if it's not. 441 /// Returns `true` if [path] is a root-relative path and `false` if it's not.
442 /// 442 ///
443 /// URLs that start with `/` are known as "root-relative", since they're 443 /// URLs that start with `/` are known as "root-relative", since they're
444 /// relative to the root of the current URL. Since root-relative paths are 444 /// relative to the root of the current URL. Since root-relative paths are
445 /// still absolute in every other sense, [isAbsolute] will return true for 445 /// still absolute in every other sense, [isAbsolute] will return true for
446 /// them. They can be detected using [isRootRelative]. 446 /// them. They can be detected using [isRootRelative].
447 /// 447 ///
448 /// No POSIX and Windows paths are root-relative. 448 /// No POSIX and Windows paths are root-relative.
449 bool isRootRelative(String path) => _parse(path).isRootRelative; 449 bool isRootRelative(String path) => _parse(path).isRootRelative;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 // doesn't count. 931 // doesn't count.
932 if (lastDot <= 0) return [file, '']; 932 if (lastDot <= 0) return [file, ''];
933 933
934 return [file.substring(0, lastDot), file.substring(lastDot)]; 934 return [file.substring(0, lastDot), file.substring(lastDot)];
935 } 935 }
936 936
937 _ParsedPath clone() => new _ParsedPath( 937 _ParsedPath clone() => new _ParsedPath(
938 style, root, isRootRelative, 938 style, root, isRootRelative,
939 new List.from(parts), new List.from(separators)); 939 new List.from(parts), new List.from(separators));
940 } 940 }
OLDNEW
« pkg/barback/test/utils.dart ('K') | « pkg/barback/test/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698