diff options
Diffstat (limited to 'runtime/utils.cc')
-rw-r--r-- | runtime/utils.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index ff6b4c0d20..8e9f12b7a0 100644 --- a/runtime/utils.cc +++ b/runtime/utils.cc @@ -1446,6 +1446,11 @@ bool Exec(std::vector<std::string>& arg_vector, std::string* error_msg) { return true; } +bool FileExists(const std::string& filename) { + struct stat buffer; + return stat(filename.c_str(), &buffer) == 0; +} + std::string PrettyDescriptor(Primitive::Type type) { return PrettyDescriptor(Primitive::Descriptor(type)); } @@ -1866,4 +1871,10 @@ int64_t GetFileSizeBytes(const std::string& filename) { return rc == 0 ? stat_buf.st_size : -1; } +void SleepForever() { + while (true) { + usleep(1000000); + } +} + } // namespace art |