Johannes Schaub - litb
Johannes Schaub - litb

Reputation: 507005

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

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?

Upvotes: 5

Views: 814

Answers (1)

Fred Foo
Fred Foo

Reputation: 363587

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.

Upvotes: 1

Related Questions