| Index: runtime/bin/file_android.cc
|
| diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
|
| index 939929a90a78bff1d2edcdb4249412135aa005f2..513f96ef6359201d95db76c824f6e83661a5ebdb 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) {
|
| + return TEMP_FAILURE_RETRY(rename(old_path, new_path)) == 0;
|
| + } else if (type == kIsDirectory) {
|
| + errno = EISDIR;
|
| + } else {
|
| + errno = ENOENT;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +
|
| off_t File::LengthFromPath(const char* name) {
|
| struct stat st;
|
| if (TEMP_FAILURE_RETRY(stat(name, &st)) == 0) {
|
|
|