Boost logo

Boost :

Subject: Re: [boost] [filesystem] home_directory_path
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-10-19 18:50:07


I've been following this discussion with great interest, since I often
have need of a portable way to get these paths. If I may contribute my
two cents' worth:

On Tue, 19 Oct 2010 14:51:34 -0400
"Stewart, Robert" <Robert.Stewart_at_[hidden]> wrote:

> Christian Holmquist wrote:
>>
>> Ok, I've always thought of My Documents as the HOME directory
>> on Windows. [...] Is there a POSIX equivalent for My Documents?
>
> Given that My Documents is nothing more than a common directory into
> or under which to deposit all user-produced content, it's only special
> in that Microsoft thought Windows users were too silly to decide for
> themselves where and how to organize their files. [...]

Having seen how many (non-technical) people just dump all their files on
their computer's desktop, I'm afraid I have to side with Microsoft on
that one. :-)

>> [...] os_path might not the best name, but you get the idea..
>
> I was thinking of something similar: indicate which directory is
> wanted by a discriminator. [...] Given that there is no specific My
> Documents equivalent on POSIX systems and no specific home directory
> on Windows, perhaps the better approach is to have calls for those
> throw an exception unless the application first defines their
> location. [...]

You said yourself, above, that My Documents on Windows is intended to be
the repository of user-generated content. (As opposed to the
"USERPROFILE" directory, which is presumably for program-generated
files such as configuration files.) On *NIX systems, the user's home
directory, or more often a user-selected subdirectory of it, serves
the same purpose. So as Bjørn Roald said in another reply, why not just
return the user's home directory for the document path?

-- 
Chad Nelson
Oak Circle Software, Inc.
*
*
*



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