Boost logo

Boost :

Subject: Re: [boost] [filesystem] basic_path::operator>> issue for paths with spaces
From: Andrew James (aj_at_[hidden])
Date: 2008-09-22 16:17:45

That can be generalized to the only character not allowed is the path separator. But that separator itself doesn't really need to be stored. How bout a serialization like

/My/Path/With Spaces/

3 2 My4 Path11With Spaces

This encodes, 3 components then the components follow.


On 9/22/08 1:01 PM, "Giovanni Piero Deretta" <gpderetta_at_[hidden]> wrote:

On Mon, Sep 22, 2008 at 9:24 PM, Scott McMurray <[hidden]> wrote:
> On Mon, Sep 22, 2008 at 14:48, Johan Råde <rade_at_[hidden]> wrote:
>> I don't know. I only have experience with Windows,
>> where spaces are common and "s are not allowed in path names.
>> It is a common convention on Windows
>> to surround paths, that contain spaces, by quotes.
>> How is this problem handled on Unix?
> Quotes are usually used, which are parsed out by the shell. For
> filenames with quotation marks, then escaping is needed, or a
> different method, such as apostrophes. In all cases, though, the
> shell has stripped the excess before passing the appropriate filename
> to the program. (The shell is also responsible for expanding
> wildcards.)
> Is there a really good solution? I don't know. It seems like I can
> even have newlines in filenames:

I think that, according to posix (or at least traditional unix), the
only character that is not allowed in a filename is '/'.

Unsubscribe & other changes:

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