|
Boost : |
From: mfdylan (dylan_at_[hidden])
Date: 2002-02-23 17:05:24
--- In boost_at_y..., "Jeff Garland" <jeff_at_c...> wrote:
>
> Also, don't we need a functions to distinguish between files and
directories.
> Something like:
>
> Given a path provide a function returning a bool that indicates if
the path is a
> file.
>
> Given a path provide a function returning a bool that indicates if
the path is a
> directory.
>
The other way to do it is of course have a function that takes a
pathname and returns a polymorphic object representing either a
directory or a file. It could then support the visitor pattern to
enable you to easily write code that treated files and directories
differently. I'm not necessarily suggesting this is better, but
should be considered.
Dylan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk