Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2008-07-04 16:34:53

Vladimir Prus wrote:
> Beman Dawes wrote:

>> Trying to put that all together:
>> * Change branch() to parent_path()
>> * Change leaf() to file_name()
> Why is "file" there? Path of "a/b/c" can refer to either file,
> or directory.

A directory is just one particular type of file.

Boost.Filesystem has always followed the POSIX definition of "File":

"An object that can be written to, or read from, or both. A file has
certain attributes, including access permissions and type. File types
include regular file, character special file, block special file, FIFO
special file, symbolic link, socket, and directory. Other types of files
may be supported by the implementation."

> Does "file" bring undesired connotation that the
> path refers to file?

That's what paths do. Refer to files.

>> * Change basename() to stem()
>> * extension() remains extension()
> 'stem' is linguistic term, whereas 'extension' is not. To be
> consistent, it's better to use 'suffix', not 'extension'. Furthermore,
> I do think we need to pay attention to Qt's suffix vs. completeSuffix
> distinction -- it seems useful one.

The term "filename extension" is well established. See or google for "file


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