📅  最后修改于: 2022-03-11 14:58:03.339000             🧑  作者: Mango
#include
#include
#include
int is_regular_file(const char *path)
{
struct stat path_stat;
stat(path, &path_stat);
return S_ISREG(path_stat.st_mode);
}