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

本文翻译自: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的含义过于狭窄。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值