Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: utils.cc

Issue 4771007: AU: Timestamp logs at startup. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: address review comments, switched mkdir perms Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils.cc
diff --git a/utils.cc b/utils.cc
index 162fe7b8d9ea51c59c19491beee4a861707bd080..359b6b8866a6fee79b5f242f91d4ea4720ce2d17 100644
--- a/utils.cc
+++ b/utils.cc
@@ -301,6 +301,11 @@ bool FileExists(const char* path) {
return 0 == lstat(path, &stbuf);
}
+bool IsSymlink(const char* path) {
+ struct stat stbuf;
+ return lstat(path, &stbuf) == 0 && S_ISLNK(stbuf.st_mode) != 0;
+}
+
std::string TempFilename(string path) {
static const string suffix("XXXXXX");
CHECK(StringHasSuffix(path, suffix));
« no previous file with comments | « utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698