| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
| 7 | 7 |
| 8 #include "bin/directory.h" | 8 #include "bin/directory.h" |
| 9 | 9 |
| 10 #include <dirent.h> // NOLINT | 10 #include <dirent.h> // NOLINT |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void PathBuffer::Reset(intptr_t new_length) { | 76 void PathBuffer::Reset(intptr_t new_length) { |
| 77 length_ = new_length; | 77 length_ = new_length; |
| 78 AsString()[length_] = '\0'; | 78 AsString()[length_] = '\0'; |
| 79 } | 79 } |
| 80 | 80 |
| 81 | 81 |
| 82 // A linked list of symbolic links, with their unique file system identifiers. | 82 // A linked list of symbolic links, with their unique file system identifiers. |
| 83 // These are scanned to detect loops while doing a recursive directory listing. | 83 // These are scanned to detect loops while doing a recursive directory listing. |
| 84 struct LinkList { | 84 struct LinkList { |
| 85 dev_t dev; | 85 uint64_t dev; |
| 86 ino_t ino; | 86 uint64_t ino; |
| 87 LinkList* next; | 87 LinkList* next; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 | 90 |
| 91 ListType DirectoryListingEntry::Next(DirectoryListing* listing) { | 91 ListType DirectoryListingEntry::Next(DirectoryListing* listing) { |
| 92 if (done_) { | 92 if (done_) { |
| 93 return kListDone; | 93 return kListDone; |
| 94 } | 94 } |
| 95 | 95 |
| 96 if (lister_ == 0) { | 96 if (lister_ == 0) { |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (exists != EXISTS) { | 465 if (exists != EXISTS) { |
| 466 return false; | 466 return false; |
| 467 } | 467 } |
| 468 return (NO_RETRY_EXPECTED(rename(path, new_path)) == 0); | 468 return (NO_RETRY_EXPECTED(rename(path, new_path)) == 0); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace bin | 471 } // namespace bin |
| 472 } // namespace dart | 472 } // namespace dart |
| 473 | 473 |
| 474 #endif // defined(TARGET_OS_ANDROID) | 474 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |