2025年为什么ENOENT意味着“没有这样的文件或目录”?

为什么ENOENT意味着“没有这样的文件或目录”?本文翻译自 Why does ENOENT mean No such file or directory What is ENT short for 什么是 耳鼻喉科 的缩写 The error error No such file or directory 没有相应的文件和目录

大家好,我是讯享网,很高兴认识大家。

本文翻译自:Why does ENOENT mean “No such file or directory”?

What is "ENT" short for? 什么是“耳鼻喉科”的缩写?

The error : error :

No such file or directory 没有相应的文件和目录

should just be named by "ENOFILE". 应该只用“ENOFILE”命名。


讯享网

Is there any story or reason? 有什么故事或理由吗?


#1楼

参考:https://stackoom.com/question/1LVdM/为什么ENOENT意味着-没有这样的文件或目录


#2楼

It's an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories. 它是Error NO ENTry(或Error NO ENTity)的缩写,实际上可以用于多个文件/目录。

It's abbreviated because C compilers at the dawn of time didn't support more than 8 characters in symbols. 它的缩写是因为C编译器在时间的早期不支持符号中超过8个字符。


#3楼

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. 由于目录条目可以是目录或文件(或符号链接,或套接字,或管道或设备),因此名称ENOFILE的含义过于狭窄。

小讯
上一篇 2025-04-07 22:52
下一篇 2025-03-14 22:54

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/101634.html