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

Unified Diff: runtime/bin/file.cc

Issue 8598011: Implement delete 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 0763e06f55bb7faff3349b08f0e3cd92b84373a3..4037dc9f3db57c315198a1b44073d770bde88e6d 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -271,6 +271,16 @@ void FUNCTION_NAME(File_Create)(Dart_NativeArguments args) {
}
+void FUNCTION_NAME(File_Delete)(Dart_NativeArguments args) {
+ Dart_EnterScope();
+ const char* str =
+ DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
+ bool result = File::Delete(str);
+ Dart_SetReturnValue(args, Dart_NewBoolean(result));
+ Dart_ExitScope();
+}
+
+
void FUNCTION_NAME(File_FullPath)(Dart_NativeArguments args) {
Dart_EnterScope();
const char* str =
« no previous file with comments | « runtime/bin/file.h ('k') | runtime/bin/file.dart » ('j') | tests/standalone/src/FileTest.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698