Skip to content
Prev 34084 / 63424 Next

basename returns "." not in filename (PR#13958)

On 18-Sep-09 19:08:15, Jens Oehlschl?gel wrote:
I am getting confused by this discussion. At least on Unixoid systems,
and I believe it holds for Windows systems too, "." stands for the
current directory ("working directory").

Moreover, "./" means exactly the same as ".": If you list the files
in "./" you will get exactly the same as if you list the files in ".".

Further, "<any directory>/." means the same as "<any directory>/"
and the same as "<any directory>", so (on the same basis) "./." also
means exactly the same as ".".

Therefore the second "." in "./." is not a filename.

What the above examples of dirname and basename usage are returning
is simply a specific representation of the current working directlory.

Forgive me if I have not seen the point, but what I think I have seen
boils down to the interpretation I have given above.

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 18-Sep-09                                       Time: 22:35:34
------------------------------ XFMail ------------------------------