Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-06 10:32:09

I think this is a badly-chosen name. Both POSIX and Python have a
basename function which does roughly what our leaf() function does.


>>> import os.path
>>> help(os.path.basename)
    Help on function basename:

        Returns the final component of a pathname

>>> os.path.basename('foo/bar.baz')


    $ info basename

    `basename': Strip directory and suffix from a file name

       `basename' removes any leading directory components from NAME.

         basename NAME [SUFFIX]

       If SUFFIX is specified and is identical to the end of NAME, it is
    removed from NAME as well. `basename' prints the result on standard

    $ basename 'foo/bar.baz'

    $ basename 'foo/bar.baz' .baz

I don't think we should use creative naming in cases like this one.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at