Rainer Schuetze wrote:
> Looks good overall. I have a few comments and nitpicks though:
> 
>>   basename("dir/subdir/")             -->  "subdir"
>>   directory("dir/subdir/")      -->  "dir"
> 
        I would say:
basename ("dir/subdir/") -> "" (or ".")
dirname  ("dir/subdir/") -> "dir/subdir"
basename ("dir/subdir")  -> "subdir"
dirname  ("dir/subdir")  -> "dir"

        Same as Python does.

> Is this what everybody expects? I'm not sure, but another possibility
> would be to treat these as if "dir/subdir/." is passed. What is the
> result of directory("/") or directory("d:/")?
> 
>>   extension("file")               -->  ""
>>   extension("file.ext")           -->  "ext"
> 
extension ("file")     -> ""
extension ("file.ext") -> ".ext"
extension ("file.")    -> "."

> 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().
> 
                Jerome
-- 
mailto:jeber...@free.fr
http://jeberger.free.fr
Jabber: jeber...@jabber.fr

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to