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

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

Issue 22999033: Add Platform.packageRoot and Platform.executableArguments to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve doc comments. 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
« no previous file with comments | « sdk/lib/_internal/lib/io_patch.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/platform.dart
diff --git a/sdk/lib/io/platform.dart b/sdk/lib/io/platform.dart
index 16b3595c35de90943ce041437f0baef93857c954..30a9a9f40bb00463707878476bbf53d374e87c13 100644
--- a/sdk/lib/io/platform.dart
+++ b/sdk/lib/io/platform.dart
@@ -89,6 +89,22 @@ class Platform {
*/
static String get script => _nativeScript;
+ /**
+ * Returns the flags passed to the executable used to run the script in this
+ * isolate. These are the command-line flags between the executable name
+ * and the script name. Each fetch of executableArguments returns a new
+ * List, containing the flags passed to the executable.
+ */
+ static List<String> get executableArguments => _Platform.executableArguments;
+
+ /**
+ * Returns the value of the --package-root flag passed to the executable
+ * used to run the script in this isolate. This is the directory in which
+ * Dart packages are looked up.
+ *
+ * If there is no --package-root flag, then the empty string is returned.
+ */
+ static String get packageRoot => _Platform.packageRoot;
/**
* Returns the version of the current Dart runtime.
« no previous file with comments | « sdk/lib/_internal/lib/io_patch.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698