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

Unified Diff: runtime/bin/file.cc

Issue 8439067: Implement fullPath method on File objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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/file.cc
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index 2289c0d0364bb4e76e27b6d8a473559a5dc80a53..2cbe96c3f75da1b09b467cf97aeef5c615e2ffb0 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -252,3 +252,16 @@ void FUNCTION_NAME(File_Create)(Dart_NativeArguments args) {
Dart_SetReturnValue(args, Dart_NewBoolean(result));
Dart_ExitScope();
}
+
+
+void FUNCTION_NAME(File_FullPath)(Dart_NativeArguments args) {
+ Dart_EnterScope();
+ const char* str =
+ DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
+ char* path = File::GetCanonicalPath(str);
+ if (path != NULL) {
+ Dart_SetReturnValue(args, Dart_NewString(path));
+ free(path);
+ }
+ Dart_ExitScope();
+}

Powered by Google App Engine
This is Rietveld 408576698