diff options
| author | Dan Albert <danalbert@google.com> | 2015-07-09 19:48:54 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-09 19:48:55 +0000 |
| commit | a35affb5fc9e7cd19a2669a82cda19789314a783 (patch) | |
| tree | 29b1d8281e4355d70bf32b4efffa5e5a9350da2b /adb/adb_utils.cpp | |
| parent | a6241a0298de5e773ef113626ca4686f9c038868 (diff) | |
| parent | 459df8f3a14d4c614f0211049800cf7cad6d30ad (diff) | |
Merge "Turn on -Wformat-nonliteral."
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; |
