Boost logo

Boost :

Subject: Re: [boost] [filesystem] Decomposition of filenames beginning with period?
From: Phil Richards (news_at_[hidden])
Date: 2011-04-18 12:35:22


On Mon, 2011-04-18 at 00:05 -0700, Joshua Juran wrote:
> On Apr 9, 2011, at 12:56 AM, Phil Richards wrote:
> > I think the library should code against "normal" coding practise - and
> > for that reason, I'd argue that .gitignore has stem .gitignore, and an
> > empty extension.
> I'd argue that .gitignore doesn't have an extension at all, empty or
> otherwise. Nor does "foo.", unless you can associate the empty
> extension with an application which handles such files when opened.

I was referring to the usage of "extension" as used in the
Boost.Filesystem library, where the extension() call returns the leading
".".

> In other words, I'd say any filename beginning or ending with a dot,
> or lacking one entirely, doesn't have an extension.

IMO, this is wrong - under Unix, anyway. The two files "foo" and "foo."
are different files. It would be odd if they both had the same stem
*and* the same extension (as well as every other bit of the paths being
identical).

Phil

-- 
Phil Richards, <news_at_[hidden]>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk