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

Unified Diff: sdk/lib/io/platform.dart

Issue 1180623006: Revert change to Platform.excutable and add Platform.resolvedExecutable (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/io/platform.dart
diff --git a/sdk/lib/io/platform.dart b/sdk/lib/io/platform.dart
index 6b86095d06158b3c459cdb68da2421cd4b09c666..509955c6ba72614c7cf3d5f51abdd0f3e4d7ad7e 100644
--- a/sdk/lib/io/platform.dart
+++ b/sdk/lib/io/platform.dart
@@ -131,7 +131,12 @@ class Platform {
* Returns the path of the executable used to run the script in this
* isolate.
*
- * If supported by the platform the returned path will be absolute.
+ * The path returned is the literal path used to run the script. This
+ * path might be relative or just be a name from which the executable
+ * was found by searching the `PATH`.
+ *
+ * To get the absolute path to the resolved executable use
+ * [resolvedExecutable].
*
* If the execution environment does not support [executable] an empty
* string is returned.
@@ -139,6 +144,18 @@ class Platform {
static String get executable => _Platform.executable;
/**
+ * Returns the path of the executable used to run the script in this
+ * isolate after it has been resolved by the OS.
+ *
+ * This is the absolute path with all symlinks resolved to the
Lasse Reichstein Nielsen 2015/06/12 14:12:17 commas around "with all symlinks resolved".
Søren Gjesse 2015/06/15 07:28:15 Done.
+ * executable used to running the script.
Lasse Reichstein Nielsen 2015/06/12 14:12:17 running -> run
Søren Gjesse 2015/06/15 07:28:15 Done.
+ *
+ * If the execution environment does not support
+ * [resolvedExecutable] an empty string is returned.
Lasse Reichstein Nielsen 2015/06/12 14:12:17 comma before "an". Or rewrite as: Returns an empty
Lasse Reichstein Nielsen 2015/06/12 14:13:31 And if throw, why give an option to not support it
Søren Gjesse 2015/06/15 07:28:15 See below.
Søren Gjesse 2015/06/15 07:28:15 Good point. Removed this option. All current platf
+ */
+ static String get resolvedExecutable => _Platform.resolvedExecutable;
+
+ /**
* Returns the absolute URI of the script being run in this
* isolate.
*

Powered by Google App Engine
This is Rietveld 408576698