Index: runtime/bin/directory.cc |
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc |
index 24e1326cbc8f847323686302274d89dec8b4989a..7f01cec3e15c5e03170f7099575ef13a46251763 100644 |
--- a/runtime/bin/directory.cc |
+++ b/runtime/bin/directory.cc |
@@ -76,6 +76,20 @@ void FUNCTION_NAME(Directory_Create)(Dart_NativeArguments args) { |
} |
+void FUNCTION_NAME(Directory_CreateTemp)(Dart_NativeArguments args) { |
+ Dart_EnterScope(); |
+ Dart_Handle path = Dart_GetNativeArgument(args, 1); |
+ if (Dart_IsString(path)) { |
+ char* result = Directory::CreateTemp(DartUtils::GetStringValue(path)); |
+ Dart_SetReturnValue(args, Dart_NewString(result)); |
+ free(result); |
+ } else { |
+ Dart_SetReturnValue(args, Dart_NewString("")); |
+ } |
+ Dart_ExitScope(); |
+} |
+ |
+ |
void FUNCTION_NAME(Directory_Delete)(Dart_NativeArguments args) { |
Dart_EnterScope(); |
Dart_Handle path = Dart_GetNativeArgument(args, 1); |