为什么 ENOENT 的意思是"没有这样的文件或目录"?

What is "ENT" short for?

The error :

No such file or directory

should just be named by "ENOFILE".

Is there any story or reason?

转载于:https://stackoverflow.com/questions/19902828/why-does-enoent-mean-no-such-file-or-directory

It's an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories.

It's simply “No such directory entry”. Since directory entries can be directories or files (or symlinks, or sockets, or pipes, or devices), the name ENOFILE would have been too narrow in its meaning.