Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-11-11 20:17:52


At 01:46 PM 11/11/2004, Thorsten Ottosen wrote:
>Hi Beman,
>
>"Beman Dawes" <bdawes_at_[hidden]> wrote in message
>news:6.0.3.0.2.20041111114438.028c55d8_at_mailhost.esva.net...
>| I'm currently working on a major revision of the Boost filesystem
library
>| aimed at getting it ready to be proposed to the C++ committee for the
>next
>| Library TR.
>
>I have a few requests:
>
>1. there should be a really easy way to iterate over a directory in a
>recursive fashion; possibly
> with the chioce of doing DFS or BFS. I know we have discussed this
>before,
>but I feel it is so commonly
> used that it should be supported.
>
>2. there should be a functions like this:
>
> template< class Seq >
> Seq load_file( const std::string& );
>
> template< class Seq >
> Seq load_file( const path& );
>
> which would permit stuff like
>
> std::string s = load_file<std::string>( "foo.txt" );
>
> A naive implementation would simply do Seq seq( iter, iter ); return
>seq;
> but the idea is of course that faster methods like mem-mapping could
be
>used.

AFAICS, those functions can be built on top of the existing filesystem
functionality. Thus they are lower priority for me than
internationalization.

But, yes, they would be useful, and I have often had to hand-coded both
recursion and bulk load/save. That's the point of the convenience header;
to be able to have at hand convenient functionality built on top of the
library's core functionality.

--Beman


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