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

Unified Diff: runtime/bin/file_macos.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_macos.cc
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
index 3cc3911fc7ceb96f5251d1a5401f06b8fd71c64e..66ea550edc03f263e9ac8234c26dab8e062244e1 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -135,6 +135,15 @@ bool File::Create(const char* name) {
}
+bool File::Delete(const char* name) {
+ int status = remove(name);
+ if (status == -1) {
+ return false;
+ }
+ return true;
+}
+
+
char* File::GetCanonicalPath(const char* pathname) {
char* abs_path = NULL;
if (pathname != NULL) {

Powered by Google App Engine
This is Rietveld 408576698