diff options
Diffstat (limited to 'runtime/utils.cc')
| -rw-r--r-- | runtime/utils.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index ff6b4c0d20..1e1c7e7098 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)); } |