Index: base/file_util_posix.cc |
=================================================================== |
--- base/file_util_posix.cc (revision 15554) |
+++ base/file_util_posix.cc (working copy) |
@@ -441,6 +441,16 @@ |
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); |
} |