Boost logo

Boost Users :

Subject: [Boost-users] [Filesystem] questions
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-06-14 12:25:22


I'm trying to replace my use of native file-path manipulations with the Filesystem TR2 candidate library, in preparation to advocating the use of this library as proper style instead of home-grown wrappers everywhere. However, I still have questions on some of the things I ran into in this simple usage:

1) I call remove (p,ec); and get a compile-time error that no form takes two arguments. Looking in the header, that seems to be the case. The Filesystem Reference (<http://www.boost.org/doc/libs/1_43_0/libs/filesystem/doc/reference.html>) clearly shows an error code parameter.

I understand this module is tracking the standardization process. So which is newer? Should I be anticipating the code change to match the docs, or vice versa?

How do I find out if there was an error and report the details? Note that I want to consider the case of the file not existing in the first place as OK.

2) The documentation shows things like:
template <class Path> bool remove(const Path& p, system::error_code & ec = singular );
    * if ec != singular, then ec.clear().

I can't find any definition for 'singular'. What is it? Besides acting as a flag to know if the argument was defaulted, it seems like it's doing some kind of one-shot behavior?

3) The basic_path constructor that takes two InputIterators: what kind of iterator is that? It doesn't seem to want characters, but an iterator of parts like produced by the begin/end functions. But the iterator's underlying type is not defined, so you can't make your own collection of "parts". So why doesn't the constructor just take its own iterator type, but is a template? What else could you give it?

The documentation is not clear.


TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net