Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2006-03-20 17:34:25


 
Stefan Seefeld wrote:

> > are there any plans to add functions to Boost.Filesystem to get
> > different default directories such as get_user_home_dir(),
> > get_app_config_dir(),
> > get_system_config_dir() et.al.?
> >
> > On Windows these probably would map directly to the
> > SHGetFolderLocation() function, on *nix based systems these
> could map
> > to some equivalent environment variable (i.e. $HOME) or some
> > convention (i.e. system config files are in /etc/...). Surely there
> > are some conventions for other systems as well.
>
> While this does indeed sound convenient, I'm afraid other
> than $HOME there are no such conventions. Or rather, there
> are too many to choose. I believe for 'system config' and
> 'application config' at least this belongs into the domain of
> applications, not system libraries. I wouldn't expect such
> features in a library such as boost_filesystem.

So let's start with $HOME then. We seem to agree here.

And even if there aren't any common conventions for the others it would be
nice to have this functionality anyway (we seem to agree on this point as
well). For instance, we could simply implement one of the conventions in
Boost. For those who like these conventions - fine. Those programmers
wanting to use their own directories - fine as well, they just won't use
Boost for that task.

I find similar functionality to be very important, and - isn't it one of the
Boost goals to provide some platform independence?

I'ld be happy to implement the Windows versions of these functions as a
starting point (given we find a minimal consensus), but would need help for
the other platforms.

Regards Hartmut


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