What does it mean "regular file" according to S_ISREG C/C++?
Let's consider the following 3 code lines:
struct stat buffer;
status = lstat(file.c_str(), &buf开发者_高级运维fer);
bool Flag = S_ISREG(buffer.st_mode)
When S_ISREG() returns true
it tells you that the file is a regular file
What does regular means exactly ?
Thanks
It is non-standard, you should check the documentation for your CRT implementation. But it ought to mean that the name refers to a regular file, instead of a pipe, stream, symbolic link, directory or device.
Regular means it's not a directory, not a symlink, not a block device, and not a character device. It's just... regular. :)
精彩评论