What does “regular file” mean according to S_ISREG C / C ++?

Consider the following 3 lines of code:

struct stat buffer; status = lstat(file.c_str(), &buffer); 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 funds mean?

thanks

+6
c ++ c unix file
source share
2 answers

Non-standard, you should check the documentation for your CRT implementation. But this should mean that the name refers to a regular file, and not to a channel, stream, symbolic link, directory or device.

+10
source share

Normal means that it is not a directory, not a symbolic link, not a block device, not a symbol device. It's just ... regular. :)

+5
source share

All Articles