Boost logo

Boost :

From: Guillaume Melquiond (gmelquio_at_[hidden])
Date: 2003-04-25 05:24:40

On Fri, 25 Apr 2003, [ISO-8859-1] Christian Engström wrote:

> Daryle Walker wrote:

> > 3. Wouldn't we need a way to turn off or escape wild-carding, if an
> > user gives a path with wild-cards characters that should _not_ be
> > expanded? (Remember that '*' and '?' are legitimate filename characters
> > on some systems.)
> Not necessarily, unless one really wanted. The underlying motive behind
> the prohibition of "*" and "?" is that the designers of the filesystem
> library feel that nobody should use those characters as part of a
> filename, even if the underlying operating system considers them
> legitimate. This restriction is explicitly mentioned in the
> documentation, and is something I agree completely with. After all, how
> many people in the real world would be interested in adopting a file
> naming practice that will effectively ensure that their programs can
> never be ported to either Windows or Unix/Linux without loads of hassle?

I am not sure to understand what you mean. Filesystems on Unix/Linux allow
'*' and '?' in the filenames (just do a <touch "?*"> on Solaris or Linux,
it works!). I can't say for '*'; but for '?' I know a lot of users whose
filenames contain this character. Just think about programs like wget that
will leave in the names the complete URI of the downloaded files, and '?'
is quite common in URIs.

So, even before speaking about portability, I think it should be better
not to restrain the libraries. It's better to create files with portable
names, but it's not a reason to forbid the opening of existing files. Not
allowing characters like '*' and '?' is typically a non-portable way to
conceive things imho, since a program made in such a way will be unable to
handle all the files of its destination plateform.



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