diff options
Diffstat (limited to 'adb/adb_utils.cpp')
| -rw-r--r-- | adb/adb_utils.cpp | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/adb/adb_utils.cpp b/adb/adb_utils.cpp index 604bd57bf2..1028838b78 100644 --- a/adb/adb_utils.cpp +++ b/adb/adb_utils.cpp @@ -42,6 +42,11 @@ bool directory_exists(const std::string& path) {    return lstat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode);  } +bool file_exists(const std::string& path) { +  struct stat sb; +  return lstat(path.c_str(), &sb) != -1 && S_ISREG(sb.st_mode); +} +  std::string escape_arg(const std::string& s) {    std::string result = s;  | 
