void getUniqueFileId(int fd, UCharBuffer& id) { struct STAT statistics; if (os_utils::fstat(fd, &statistics) != 0) system_call_failed::raise("fstat"); makeUniqueFileId(statistics, id); }
void getUniqueFileId(const char* name, UCharBuffer& id) { struct STAT statistics; if (os_utils::stat(name, &statistics) != 0) { id.clear(); return; } makeUniqueFileId(statistics, id); }
void getUniqueFileId(int fd, UCharBuffer& id) { struct stat statistics; while (fstat(fd, &statistics) != 0) { if (errno == EINTR) continue; system_call_failed::raise("fstat"); } makeUniqueFileId(statistics, id); }
void getUniqueFileId(const char* name, UCharBuffer& id) { struct stat statistics; while (stat(name, &statistics) != 0) { if (errno == EINTR) continue; id.clear(); return; } makeUniqueFileId(statistics, id); }