绝对(“/foo”)和相对(“../foo”)文件名。什么是“foo”?类别叫什么?
有三种类型的文件名
首先(植根于某种“当前工作目录”之下)
../foo
./foo
bar/foo # really in this group?
和(植根于绝对路径,独立于 CWD)
/foo
/bar/foo
以及(独立于 CWD 并独立于任何绝对路径)
foo
bar/foo # really in this group?
我不确定在哪里放置 bar/foo
东西。这三个类别有通用的命名约定吗?或者还有更多吗?
There are three types of file names
First (rooted below some kind of "current working directory")
../foo
./foo
bar/foo # really in this group?
And (rooted in an absolute path, independent of the CWD)
/foo
/bar/foo
And (independent of the CWD and independent of any absolute path)
foo
bar/foo # really in this group?
I'm unsure where to put the bar/foo
thing in. Is there a general naming convention for these three categories? Or are there more of them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
foo
也是一个相对路径名。任何不包含目录分隔符的路径都相对于当前目录。
在另一个分类法中,您可以将
foo
称为基本名称;然后bar/foo
移动到第一个类别。foo
is also a relative pathname. Any path not containing a directory separator is relative to the current directory.
In another taxonomy, you could call
foo
a basename; thenbar/foo
moves to the first category.