Subject: Re: [boost] boost::filesystem::path frustration
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2013-01-28 09:47:52
Dave Abrahams <dave_at_[hidden]> writes:
> on Sun Jan 27 2013, Rob Stewart <robertstewart-AT-comcast.net> wrote:
>> On Jan 25, 2013, at 6:52 PM, Dave Abrahams <dave_at_[hidden]> wrote:
>>> IMO paths are abstract entities that aren't necessarily realized in
>>> the local filesystem. The results of pure path manipulations must
>>> therefore not depend on the state of the local filesystem.
>>> Operations accepting paths as input that depend on the local
>>> filesystem structure should be seen as operations on the filesystem
>>> rather than operations on paths.
>> I also like the idea that a path is a container of elements.
> In fact there probably ought to be an object representing the local
> filesystem, so you could also (in principle) do operations on a remote
> filesystem. That would very clearly distinguish path operations from
> filesystem ones: since you don't need a filesystem to manipulate paths,
> the signatures would differ.
This is exactly what I've been working on recently: mirroring the
Boost.Filesystem functions with versions that take an extra argument
which, at the moment, I pass my SFTP filesystem object.
-- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk