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 library path; | 6 library path; |
7 | 7 |
8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
9 | 9 |
10 /// An internal builder for the current OS so we can provide a straight | 10 /// An internal builder for the current OS so we can provide a straight |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 var lastDot = file.lastIndexOf('.'); | 723 var lastDot = file.lastIndexOf('.'); |
724 | 724 |
725 // If there is no dot, or it's the first character, like '.bashrc', it | 725 // If there is no dot, or it's the first character, like '.bashrc', it |
726 // doesn't count. | 726 // doesn't count. |
727 if (lastDot <= 0) return [file, '']; | 727 if (lastDot <= 0) return [file, '']; |
728 | 728 |
729 return [file.substring(0, lastDot), file.substring(lastDot)]; | 729 return [file.substring(0, lastDot), file.substring(lastDot)]; |
730 } | 730 } |
731 | 731 |
732 _ParsedPath clone() => new _ParsedPath( | 732 _ParsedPath clone() => new _ParsedPath( |
733 style, root, new List.from(parts), new List.from(separators)); | 733 style, root, new List.from(parts, growable: true), |
| 734 new List.from(separators, growable: true)); |
734 } | 735 } |
OLD | NEW |