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

Side by Side Diff: samples/buildhook2/build.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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 | « runtime/vm/intrinsifier_x64.cc ('k') | samples/markdown/html_renderer.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 import "dart:io"; 5 import "dart:io";
6 import "package:args/args.dart"; 6 import "package:args/args.dart";
7 7
8 bool cleanBuild; 8 bool cleanBuild;
9 bool fullBuild; 9 bool fullBuild;
10 List<String> changedFiles; 10 List<String> changedFiles;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 parser.addFlag("help", negatable: false, help: "displays this help and exit"); 47 parser.addFlag("help", negatable: false, help: "displays this help and exit");
48 var args = parser.parse(new Options().arguments); 48 var args = parser.parse(new Options().arguments);
49 if (args["help"]) { 49 if (args["help"]) {
50 print(parser.getUsage()); 50 print(parser.getUsage());
51 exit(0); 51 exit(0);
52 } 52 }
53 53
54 changedFiles = args["changed"]; 54 changedFiles = args["changed"];
55 removedFiles = args["removed"]; 55 removedFiles = args["removed"];
56 cleanBuild = args["clean"]; 56 cleanBuild = args["clean"];
57 fullBuild = changedFiles.isEmpty() && removedFiles.isEmpty() && !cleanBuild; 57 fullBuild = changedFiles.isEmpty && removedFiles.isEmpty && !cleanBuild;
58 } 58 }
59 59
60 /** 60 /**
61 * Delete all generated files. 61 * Delete all generated files.
62 */ 62 */
63 void handleCleanCommand() { 63 void handleCleanCommand() {
64 Directory current = new Directory.current(); 64 Directory current = new Directory.current();
65 current.list(recursive: true).onFile = _maybeClean; 65 current.list(recursive: true).onFile = _maybeClean;
66 } 66 }
67 67
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 /** 117 /**
118 * If this file is a generated file (based on the extension), delete it. 118 * If this file is a generated file (based on the extension), delete it.
119 */ 119 */
120 void _maybeClean(String file) { 120 void _maybeClean(String file) {
121 if (file.endsWith(".foobar")) { 121 if (file.endsWith(".foobar")) {
122 new File(file).delete(); 122 new File(file).delete();
123 } 123 }
124 } 124 }
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | samples/markdown/html_renderer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698