Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-09-23 15:20:11

At 03:46 PM 9/23/2002, Jeff Garland wrote:

>> >* It is inconvenient that a trailing '/' is not allowed on directory
>> > construction of POSIX paths. This does not seem like 'invalid path
>> > syntax'.
>> > As an example, if I type 'ls /home/foo' or ls '/home/foo/'
>> > /home/foo is a directory) the result is the listing of the
>> > contents. If /home/foo is a file then I get an error.
>> Maybe disallowing / at the end is being too picky. It doesn't really
>> anything. I don't have a strong feeling one way or the other.
>Ok, then I would prefer to allow it because otherwise a program
>taking human input has to be certain to strip this off to get the
>'expected behavior'. For example if you write a program run from
>a command line that takes a directory path as an argument and happen
>to use the bash autocomplete feature (which automatically tacks on a /
>to directory names) if your program doesn't strip the / it gets
>an exception. As you can see, this has happened to me :-)

OK. I'll change it.

>> >* The 'Representation Example' link in the path documentation is
>> > everywhere.
>> Hum. I don't see anything wrong. It works with Netscape 3.x and IE 5.x.

>> What browser are you using? Maybe spaces in bookmarks aren't supported
>> all browsers.
>Konqueror on Linux. And, yes I confirmed it is the space that is the

Grrr.... Dave Abrahams asked me about spaces awhile ago, and I said they
were OK. I thought so because the validator was accepting them.

>> > std::fstream f(p); //open a network connection and download
>> > ...
>> I don't know the committee would feel about fstream being extended to
>> that, but your real point is that path has headroom to expand to other
>> uses, and I agree completely on that.
>Yes, in retrospect it probably should be something like std::http_stream,
>which is yet another sorely needed C++ library given the role of the
>internet these days. Of course we need still need a socket library



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