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

Unified Diff: runtime/bin/file_macos.cc

Issue 12691002: dart:io | Add Link class, as sibling to File and Directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reverted patch, including fixes 19774 and 19775. Created 7 years, 9 months 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 920d01f230896bd41fee5744f4582d0f4ad4dfd2..989b49b58c48f7393c305abc2c1d5e185c41f6e9 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -161,6 +161,12 @@ bool File::Create(const char* name) {
}
+bool File::CreateLink(const char* name, const char* target) {
+ int status = TEMP_FAILURE_RETRY(symlink(target, name));
+ return (status == 0);
+}
+
+
bool File::Delete(const char* name) {
int status = TEMP_FAILURE_RETRY(remove(name));
if (status == -1) {

Powered by Google App Engine
This is Rietveld 408576698