Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 /// | |
| 7 /// ## Installing ## | |
| 8 /// | |
| 9 /// Use [pub][] to install this package. Add the following to your `pubspec.yaml ` | |
|
Andrei Mouravski
2013/04/19 20:13:35
Line too long.
sethladd
2013/04/19 20:32:43
Done.
| |
| 10 /// file. | |
| 11 /// | |
| 12 /// dependencies: | |
| 13 /// pathos: any | |
| 14 /// | |
| 15 /// And then run `pub install`. | |
| 16 /// | |
| 17 /// [pub]: http://pub.dartlang.org | |
| 6 library path; | 18 library path; |
| 7 | 19 |
| 8 import 'dart:io' as io; | 20 import 'dart:io' as io; |
| 9 | 21 |
| 10 /// An internal builder for the current OS so we can provide a straight | 22 /// An internal builder for the current OS so we can provide a straight |
| 11 /// functional interface and not require users to create one. | 23 /// functional interface and not require users to create one. |
| 12 final _builder = new Builder(); | 24 final _builder = new Builder(); |
| 13 | 25 |
| 14 /** | 26 /** |
| 15 * Inserts [length] elements in front of the [list] and fills them with the | 27 * Inserts [length] elements in front of the [list] and fills them with the |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 737 // If there is no dot, or it's the first character, like '.bashrc', it | 749 // If there is no dot, or it's the first character, like '.bashrc', it |
| 738 // doesn't count. | 750 // doesn't count. |
| 739 if (lastDot <= 0) return [file, '']; | 751 if (lastDot <= 0) return [file, '']; |
| 740 | 752 |
| 741 return [file.substring(0, lastDot), file.substring(lastDot)]; | 753 return [file.substring(0, lastDot), file.substring(lastDot)]; |
| 742 } | 754 } |
| 743 | 755 |
| 744 _ParsedPath clone() => new _ParsedPath( | 756 _ParsedPath clone() => new _ParsedPath( |
| 745 style, root, new List.from(parts), new List.from(separators)); | 757 style, root, new List.from(parts), new List.from(separators)); |
| 746 } | 758 } |
| OLD | NEW |