Use FFstrbuf in emerge package counting

This commit is contained in:
Linus Dierheimer
2022-02-12 12:06:16 +01:00
parent 8a754f5b89
commit 8c6cb9405d
5 changed files with 39 additions and 43 deletions
+6
View File
@@ -497,3 +497,9 @@ void ffPrintColor(const FFstrbuf* colorValue)
ffStrbufWriteTo(colorValue, stdout);
fputc('m', stdout);
}
bool ffFileExists(const char* fileName, mode_t mode)
{
struct stat fileStat;
return stat(fileName, &fileStat) == 0 && ((fileStat.st_mode & S_IFMT) == mode);
}