On 03/06/2011 04:41 PM, Rainer Schuetze wrote:
Lars T. Kyllingstad wrote:
On Sun, 06 Mar 2011 09:37:15 +0100, Rainer Schuetze wrote:
What about "file."? I tried it on NTFS, but trailing '.' seems to always
be cut off. Is it possible to create such a file on unix systems? If
yes, you won't be able to recreate it from the result of basename() and
extension().
Good point. I don't know if there is any kind of precedent here. What do
others think?
Maybe special casing similar to the "hidden" files starting with '.':
basename("file.") --> "file."
extension("file.") --> ""
I agrre, and this is probably the correct solution: if there is nothing after
the dot, then it's not an extension separator, thus it's part of the baseName
(just like if there is nothing before the dot).
Denis
--
_________________
vita es estrany
spir.wikidot.com