为什么 ENOENT 的意思是“没有这样的文件或目录"?
问题描述:
ENOENT
中的ENT
是什么意思?
该不该报错:
没有那个文件或目录
只是被ENOFILE
命名?
有什么故事或原因吗?
答
它是 Error NO ENTry(或 Error NO ENTity)的缩写,实际上可以用于多个文件/目录.
It's an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories.
它被缩写是因为早期的 C 编译器不支持超过 8 个字符的符号.
It's abbreviated because C compilers at the dawn of time didn't support more than 8 characters in symbols.