| Index: runtime/bin/directory_posix.cc
|
| diff --git a/runtime/bin/directory_posix.cc b/runtime/bin/directory_posix.cc
|
| index 1c672a804d7e86ad6a6f0e51b2e20848f50a3a4c..7adb80f9156ab2d308131aee2181243b35b85a27 100644
|
| --- a/runtime/bin/directory_posix.cc
|
| +++ b/runtime/bin/directory_posix.cc
|
| @@ -423,3 +423,10 @@ bool Directory::Delete(const char* dir_name, bool recursive) {
|
| return DeleteRecursively(dir_name);
|
| }
|
| }
|
| +
|
| +
|
| +bool Directory::Rename(const char* path, const char* new_path) {
|
| + ExistsResult exists = Exists(path);
|
| + if (exists != EXISTS) return false;
|
| + return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0);
|
| +}
|
|
|