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

Unified Diff: runtime/bin/file_linux.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_linux.cc
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index ce0ef27bb26c5ea84f21e13424b345098c4d2f4e..488bafb7a2eaf72cba0ca64c4c9080091a74021d 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -159,6 +159,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