开发者

Absolute ("/foo") and relative ("../foo") file names. What is the "foo" category called?

开发者 https://www.devze.com 2023-03-20 01:49 出处:网络
There are three t开发者_开发问答ypes of file names First (rooted below some kind of \"current working directory\")

There are three t开发者_开发问答ypes 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?


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; then bar/foo moves to the first category.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号