From 5e2b971e468ca73a8e10a120730b3b6f17fad408 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Fri, 18 Dec 2015 14:10:00 +0200 Subject: Assume the profile file was created before saving. bug: 26080105 Change-Id: I9969a4abd8533614922076551fcbae2cdf695525 --- runtime/utils.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/utils.cc') 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& 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)); } -- cgit v1.2.3-59-g8ed1b