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

Unified Diff: runtime/bin/directory.cc

Issue 9622001: Add the ability to get the current directory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix windows Created 8 years, 9 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: runtime/bin/directory.cc
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index 51397d394b9f891d4cd84d9c716f76d5658f7d6a..db3f3b8181ea6b19a5681eed636dbb65ffc46bbc 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -14,6 +14,17 @@ int Directory::service_ports_size_ = 0;
Dart_Port* Directory::service_ports_ = NULL;
int Directory::service_ports_index_ = 0;
+void FUNCTION_NAME(Directory_Current)(Dart_NativeArguments args) {
+ Dart_EnterScope();
+ char* current = Directory::Current();
+ if (current != NULL) {
+ Dart_SetReturnValue(args, Dart_NewString(current));
+ free(current);
+ }
+ Dart_ExitScope();
+}
+
+
void FUNCTION_NAME(Directory_Exists)(Dart_NativeArguments args) {
static const int kError = -1;
static const int kExists = 1;
« no previous file with comments | « runtime/bin/directory.h ('k') | runtime/bin/directory.dart » ('j') | runtime/bin/directory.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698