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

Side by Side Diff: utils/pub/io.dart

Issue 10351011: Change Platform members to getters instead of methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding new test binaries Created 8 years, 7 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 | « utils/compiler/build_helper.dart ('k') | utils/tests/pub/test_pub.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 * Helper functionality to make working with IO easier. 6 * Helper functionality to make working with IO easier.
7 */ 7 */
8 #library('pub_io'); 8 #library('pub_io');
9 9
10 #import('dart:io'); 10 #import('dart:io');
(...skipping 20 matching lines...) Expand all
31 parts.removeLast(); 31 parts.removeLast();
32 } else if (piece != '') { 32 } else if (piece != '') {
33 if (parts.length > 0 && parts.last() == '.') { 33 if (parts.length > 0 && parts.last() == '.') {
34 parts.removeLast(); 34 parts.removeLast();
35 } 35 }
36 parts.add(piece); 36 parts.add(piece);
37 } 37 }
38 } 38 }
39 } 39 }
40 40
41 return Strings.join(parts, Platform.pathSeparator()); 41 return Strings.join(parts, Platform.pathSeparator);
42 } 42 }
43 43
44 /** 44 /**
45 * Gets the basename, the file name without any leading directory path, for 45 * Gets the basename, the file name without any leading directory path, for
46 * [file], which can either be a [String], [File], or [Directory]. 46 * [file], which can either be a [String], [File], or [Directory].
47 */ 47 */
48 String basename(file) { 48 String basename(file) {
49 return fs.basename(_getPath(file)); 49 return fs.basename(_getPath(file));
50 } 50 }
51 51
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 319
320 /** 320 /**
321 * Gets a [Directory] for [entry], which can either already be one, or be a 321 * Gets a [Directory] for [entry], which can either already be one, or be a
322 * [String]. 322 * [String].
323 */ 323 */
324 Directory _getDirectory(entry) { 324 Directory _getDirectory(entry) {
325 if (entry is Directory) return entry; 325 if (entry is Directory) return entry;
326 return new Directory(entry); 326 return new Directory(entry);
327 } 327 }
OLDNEW
« no previous file with comments | « utils/compiler/build_helper.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698