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

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

Issue 19492003: pkg/path: fixed tiny doc bug (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 /// 102 ///
103 /// Trailing separators are ignored. 103 /// Trailing separators are ignored.
104 /// 104 ///
105 /// builder.basenameWithoutExtension('path/to/foo.dart/'); // -> 'foo' 105 /// builder.basenameWithoutExtension('path/to/foo.dart/'); // -> 'foo'
106 String basenameWithoutExtension(String path) => 106 String basenameWithoutExtension(String path) =>
107 _builder.basenameWithoutExtension(path); 107 _builder.basenameWithoutExtension(path);
108 108
109 /// Gets the part of [path] before the last separator. 109 /// Gets the part of [path] before the last separator.
110 /// 110 ///
111 /// path.dirname('path/to/foo.dart'); // -> 'path/to' 111 /// path.dirname('path/to/foo.dart'); // -> 'path/to'
112 /// path.dirname('path/to'); // -> 'to' 112 /// path.dirname('path/to'); // -> 'path'
113 /// 113 ///
114 /// Trailing separators are ignored. 114 /// Trailing separators are ignored.
115 /// 115 ///
116 /// builder.dirname('path/to/'); // -> 'path' 116 /// builder.dirname('path/to/'); // -> 'path'
117 String dirname(String path) => _builder.dirname(path); 117 String dirname(String path) => _builder.dirname(path);
118 118
119 /// Gets the file extension of [path]: the portion of [basename] from the last 119 /// Gets the file extension of [path]: the portion of [basename] from the last
120 /// `.` to the end (including the `.` itself). 120 /// `.` to the end (including the `.` itself).
121 /// 121 ///
122 /// path.extension('path/to/foo.dart'); // -> '.dart' 122 /// path.extension('path/to/foo.dart'); // -> '.dart'
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 // doesn't count. 1131 // doesn't count.
1132 if (lastDot <= 0) return [file, '']; 1132 if (lastDot <= 0) return [file, ''];
1133 1133
1134 return [file.substring(0, lastDot), file.substring(lastDot)]; 1134 return [file.substring(0, lastDot), file.substring(lastDot)];
1135 } 1135 }
1136 1136
1137 _ParsedPath clone() => new _ParsedPath( 1137 _ParsedPath clone() => new _ParsedPath(
1138 style, root, isRootRelative, 1138 style, root, isRootRelative,
1139 new List.from(parts), new List.from(separators)); 1139 new List.from(parts), new List.from(separators));
1140 } 1140 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698