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

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

Issue 12090093: Reapply "Rename mappedBy to map." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug in previous commit. Created 7 years, 10 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/oauth2/lib/src/utils.dart ('k') | pkg/serialization/lib/src/basic_rule.dart » ('j') | 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 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 var numArgs; 173 var numArgs;
174 for (numArgs = args.length; numArgs >= 1; numArgs--) { 174 for (numArgs = args.length; numArgs >= 1; numArgs--) {
175 if (args[numArgs - 1] != null) break; 175 if (args[numArgs - 1] != null) break;
176 } 176 }
177 177
178 // Show the arguments. 178 // Show the arguments.
179 var message = new StringBuffer(); 179 var message = new StringBuffer();
180 message.add("$method("); 180 message.add("$method(");
181 message.add(args.take(numArgs) 181 message.add(args.take(numArgs)
182 .mappedBy((arg) => arg == null ? "null" : '"$arg"') 182 .map((arg) => arg == null ? "null" : '"$arg"')
183 .join(", ")); 183 .join(", "));
184 message.add("): part ${i - 1} was null, but part $i was not."); 184 message.add("): part ${i - 1} was null, but part $i was not.");
185 throw new ArgumentError(message.toString()); 185 throw new ArgumentError(message.toString());
186 } 186 }
187 } 187 }
188 188
189 /// An instantiable class for manipulating paths. Unlike the top-level 189 /// An instantiable class for manipulating paths. Unlike the top-level
190 /// functions, this lets you explicitly select what platform the paths will use. 190 /// functions, this lets you explicitly select what platform the paths will use.
191 class Builder { 191 class Builder {
192 /// Creates a new path builder for the given style and root directory. 192 /// Creates a new path builder for the given style and root directory.
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 // If there is no dot, or it's the first character, like '.bashrc', it 692 // If there is no dot, or it's the first character, like '.bashrc', it
693 // doesn't count. 693 // doesn't count.
694 if (lastDot <= 0) return [file, '']; 694 if (lastDot <= 0) return [file, ''];
695 695
696 return [file.substring(0, lastDot), file.substring(lastDot)]; 696 return [file.substring(0, lastDot), file.substring(lastDot)];
697 } 697 }
698 698
699 _ParsedPath clone() => new _ParsedPath( 699 _ParsedPath clone() => new _ParsedPath(
700 style, root, new List.from(parts), new List.from(separators)); 700 style, root, new List.from(parts), new List.from(separators));
701 } 701 }
OLDNEW
« no previous file with comments | « pkg/oauth2/lib/src/utils.dart ('k') | pkg/serialization/lib/src/basic_rule.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698