Chromium Code Reviews| Index: runtime/bin/file_android.cc |
| diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc |
| index 939929a90a78bff1d2edcdb4249412135aa005f2..b41534d4d759b1346dbc06f60c9e7b55820f888f 100644 |
| --- a/runtime/bin/file_android.cc |
| +++ b/runtime/bin/file_android.cc |
| @@ -192,6 +192,19 @@ bool File::DeleteLink(const char* name) { |
| } |
| +bool File::Rename(const char* old_path, const char* new_path) { |
| + File::Type type = File::GetType(old_path, true); |
| + if (type == kIsFile) { |
|
Anders Johnsen
2013/06/14 07:54:35
|| kIsLink, for broken links?
Søren Gjesse
2013/06/14 11:00:10
Renaming of broken links will be through Link clas
|
| + return TEMP_FAILURE_RETRY(rename(old_path, new_path)) == 0; |
| + } else if (type == kIsDirectory) { |
| + errno = EISDIR; |
| + } else {te |
|
Anders Johnsen
2013/06/14 07:54:35
Remove 'te'.
Søren Gjesse
2013/06/14 11:00:10
Done.
|
| + errno = ENOENT; |
| + } |
| + return false; |
| +} |
| + |
| + |
| off_t File::LengthFromPath(const char* name) { |
| struct stat st; |
| if (TEMP_FAILURE_RETRY(stat(name, &st)) == 0) { |