Esempio n. 1
0
void getUniqueFileId(int fd, UCharBuffer& id)
{
	struct STAT statistics;
	if (os_utils::fstat(fd, &statistics) != 0)
		system_call_failed::raise("fstat");

	makeUniqueFileId(statistics, id);
}
Esempio n. 2
0
void getUniqueFileId(const char* name, UCharBuffer& id)
{
	struct STAT statistics;
	if (os_utils::stat(name, &statistics) != 0)
	{
		id.clear();
		return;
	}

	makeUniqueFileId(statistics, id);
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
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);
}