Absolute ("/foo") and relative ("../foo") file names. What is the "foo" category called?
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.
精彩评论