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

Unified Diff: runtime/bin/file_win.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_win.cc
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 975b8f21b045948561745b5eda207be987b12bf1..b7454c59bcf8c81a1450227fa805829533b7fa94 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -126,6 +126,15 @@ bool File::Create(const char* name) {
}
+bool File::Delete(const char* name) {
+ int status = remove(name);
+ if (status == -1) {
+ return false;
+ }
+ return true;
+}
+
+
bool File::IsAbsolutePath(const char* pathname) {
// Should we consider network paths?
if (pathname == NULL) return false;

Powered by Google App Engine
This is Rietveld 408576698