| Index: runtime/bin/file.cc
|
| diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
|
| index ed86895d24a95f229ebbbc07ee1a5e0e2b2d285b..62510de21c38919972f8cc10663979ccbc2e825d 100644
|
| --- a/runtime/bin/file.cc
|
| +++ b/runtime/bin/file.cc
|
| @@ -320,6 +320,21 @@ void FUNCTION_NAME(File_Delete)(Dart_NativeArguments args) {
|
| }
|
|
|
|
|
| +void FUNCTION_NAME(File_Directory)(Dart_NativeArguments args) {
|
| + Dart_EnterScope();
|
| + const char* str =
|
| + DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
|
| + char* str_copy = strdup(str);
|
| + char* path = File::GetContainingDirectory(str_copy);
|
| + if (path != NULL) {
|
| + Dart_SetReturnValue(args, Dart_NewString(path));
|
| + }
|
| + free(str_copy);
|
| + free(path);
|
| + Dart_ExitScope();
|
| +}
|
| +
|
| +
|
| void FUNCTION_NAME(File_FullPath)(Dart_NativeArguments args) {
|
| Dart_EnterScope();
|
| const char* str =
|
|
|