Why does ENOENT mean “No such file or directory”?

2019-01-08 03:11发布

What is "ENT" short for?

The error :

No such file or directory

should just be named by "ENOFILE".

Is there any story or reason?

标签: c linux unix
2条回答
手持菜刀,她持情操
2楼-- · 2019-01-08 03:45

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.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-01-08 04:04

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

查看更多
登录 后发表回答