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

Unified Diff: utils/compiler/create_snapshot.dart

Issue 23054008: Remove the Path class from dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fixes Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« sdk/lib/io/http_impl.dart ('K') | « utils/compiler/compiler.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/compiler/create_snapshot.dart
diff --git a/utils/compiler/create_snapshot.dart b/utils/compiler/create_snapshot.dart
index 5e429bd29dd56e0b8d08feca8108ed0cc3074ff1..3077faa9cc7b04656def76b099bfe5bfb520cd0c 100644
--- a/utils/compiler/create_snapshot.dart
+++ b/utils/compiler/create_snapshot.dart
@@ -3,11 +3,11 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
+import "package:path/path.dart";
ahe 2013/08/14 16:14:09 I'm going to be very unreasonable and ask you to n
Søren Gjesse 2013/08/15 09:07:12 Removed, and changed this file to use the Uri clas
ahe 2013/08/15 09:29:00 Hopefully, that is temporary.
Future<String> getVersion(var options, var rootPath) {
var suffix = Platform.operatingSystem == 'windows' ? '.exe' : '';
- var printVersionScript =
- rootPath.append("tools").append("print_version.py").toNativePath();
+ var printVersionScript = join(rootPath, "tools", "print_version.py");
return Process.run("python$suffix", [printVersionScript]).then((result) {
if (result.exitCode != 0) {
throw "Could not generate version";
@@ -17,8 +17,8 @@ Future<String> getVersion(var options, var rootPath) {
}
Future<String> getSnapshotGenerationFile(var options, var args, var rootPath) {
- var dart2js = rootPath.append(args["dart2js_main"]);
- var dartdoc = rootPath.append(args["dartdoc_main"]);
+ var dart2js = join(rootPath, args["dart2js_main"]);
+ var dartdoc = join(rootPath, args["dartdoc_main"]);
return getVersion(options, rootPath).then((version) {
var snapshotGenerationText =
@@ -86,9 +86,9 @@ void main() {
if (!args.containsKey("output_dir")) throw "Please specify output_dir";
if (!args.containsKey("package_root")) throw "Please specify package_root";
- var scriptFile = new File(new File(options.script).fullPathSync());
- var path = new Path(scriptFile.directory.path);
- var rootPath = path.directoryPath.directoryPath;
+ var scriptFile = new File(options.script).fullPathSync();
+ var path = dirname(scriptFile);
+ var rootPath = dirname(dirname(path));
getSnapshotGenerationFile(options, args, rootPath).then((result) {
var wrapper = "${args['output_dir']}/utils_wrapper.dart";
writeSnapshotFile(wrapper, result);
« sdk/lib/io/http_impl.dart ('K') | « utils/compiler/compiler.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698