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

Side by Side Diff: runtime/bin/path.dart

Issue 10668041: Make Path implement (extend) Hashable, and make Path.append to an empty path work right. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests. Created 8 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
« no previous file with comments | « no previous file | runtime/bin/path_impl.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 /** 5 /**
6 * A Path, which is a String interpreted as a sequence of path segments, 6 * A Path, which is a String interpreted as a sequence of path segments,
7 * which are strings, separated by forward slashes. 7 * which are strings, separated by forward slashes.
8 * Paths are immutable wrappers of a String, that offer member functions for 8 * Paths are immutable wrappers of a String, that offer member functions for
9 * useful path manipulations and queries. Joining of paths and normalization 9 * useful path manipulations and queries. Joining of paths and normalization
10 * interpret '.' and '..' in the usual way. 10 * interpret '.' and '..' in the usual way.
11 */ 11 */
12 interface Path default _Path { 12 interface Path extends Hashable default _Path {
13 /** 13 /**
14 * Creates a Path from the String [source]. [source] is used as-is, so if 14 * Creates a Path from the String [source]. [source] is used as-is, so if
15 * the string does not consist of segments separated by forward slashes, the 15 * the string does not consist of segments separated by forward slashes, the
16 * behavior may not be as expected. Paths are immutable, and constant 16 * behavior may not be as expected. Paths are immutable, and constant
17 * Path objects may be constructed from constant Strings. 17 * Path objects may be constructed from constant Strings.
18 */ 18 */
19 const Path(String source); 19 const Path(String source);
20 20
21 /** 21 /**
22 * Creates a Path from a String that uses the native filesystem's conventions. 22 * Creates a Path from a String that uses the native filesystem's conventions.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 /** 167 /**
168 * The part of [filename] after the last '.', or '' if [filename] 168 * The part of [filename] after the last '.', or '' if [filename]
169 * contains no '.'. If [filename] is '.' or '..', returns ''. 169 * contains no '.'. If [filename] is '.' or '..', returns ''.
170 * 170 *
171 * new Path('tiger.svg').extension == 'svg' 171 * new Path('tiger.svg').extension == 'svg'
172 * new Path('/src/dart/dart_secrets').extension == '' 172 * new Path('/src/dart/dart_secrets').extension == ''
173 */ 173 */
174 String get extension(); 174 String get extension();
175 } 175 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/path_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698