Index: base/file_util_posix.cc |
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc |
index ae296cac95b96d4be2f0cea1f2f3e1ef8db84ece..96c1c177644222cac97e0dda6e65248b02f3044a 100644 |
--- a/base/file_util_posix.cc |
+++ b/base/file_util_posix.cc |
@@ -440,6 +440,16 @@ bool GetFileInfo(const FilePath& file_path, FileInfo* results) { |
return true; |
} |
+bool GetInode(const FilePath& path, ino_t* inode) { |
+ struct stat buffer; |
+ int result = stat(path.value().c_str(), &buffer); |
+ if (result < 0) |
+ return false; |
+ |
+ *inode = buffer.st_ino; |
+ return true; |
+} |
+ |
FILE* OpenFile(const std::string& filename, const char* mode) { |
return OpenFile(FilePath(filename), mode); |
} |