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

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

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 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
« no previous file with comments | « sdk/lib/io/options.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 bdb56b856d9d90c70dc13d89b6df548b96762640..90fe65a2dd62b55c0b45d62529346da304cbd2dc 100644
--- a/sdk/lib/io/platform.dart
+++ b/sdk/lib/io/platform.dart
@@ -13,6 +13,13 @@ class Platform {
static final _pathSeparator = _Platform.pathSeparator;
static final _operatingSystem = _Platform.operatingSystem;
static final _localHostname = _Platform.localHostname;
+ static final _version = _Platform.version;
+
+ // This executable singleton is written to by the embedder if applicable.
+ static String _nativeExecutable = '';
+
+ // This script singleton is written to by the embedder if applicable.
+ static String _nativeScript = '';
/**
* Get the number of processors of the machine.
@@ -65,4 +72,27 @@ class Platform {
* a standard case-sensitive map.
*/
static Map<String, String> get environment => _Platform.environment;
+
+ /**
+ * Returns the path of the executable used to run the script in this
+ * isolate.
+ *
+ * If the execution environment does not support [executable] an empty
+ * string is returned.
+ */
+ static String get executable => _nativeExecutable;
+
+ /**
+ * Returns the path of the script being run in this isolate.
+ *
+ * If the executable environment does not support [script] an empty
+ * string is returned.
+ */
+ static String get script => _nativeScript;
+
+
+ /**
+ * Returns the version of the current Dart runtime.
+ */
+ static String get version => _version;
}
« no previous file with comments | « sdk/lib/io/options.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698