At 02:15 PM 11/24/2002, Matthias Troyer wrote:
>I have started using the boost filesystem library in our application
>codes and encountered a problem that could be solved by adding either
>of the three functions
>
>bool is_relative() const;
>bool is_absolute() const;
>void make_absolute();
>
>to the path class.
>
>Let me motivate this by an example: if the user specifies a relative
>path the file system library automatically prepends it with the result
>of a call to initial_directory(). In parallel programs however, even
>when the file system is shared, the result of a call to
>initial_directory() need not be the same on all nodes of a parallel
>machine. Thus I need to convert all relative paths to absolute ones
>before sending the path to another node.
>
>At the moment I check for this by asking whether the first character is
>a '/', but this works only under Unix variants but not under Windows.
>Although we do not run our codes under Windows, other users of our
>libraries might and I would thus like to have a portable method, which
>could be implemented through either of the three functions mentioned
>above. Neither of the functions should be more than a single-line
>function.
>
>What do you think about that?
These suggestions came up during the formal review, and work is underway on
adding them to class path.
The branch fs_review gives a snapshot of work-in-progress. It isn't stable
at the moment, but progress is definitely being made. I'm hoping to get a
lot of work done on it this coming week.
Because of the many code-breaking changes being made as a result of the
formal review, it might be better to wait a bit before using the library in
important code.
--Beman
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
- [boost] relative/absolute paths in filesystem library Matthias Troyer
- Re: [boost] Re: relative/absolute paths in filesystem... Beman Dawes
- Re: [boost] Re: relative/absolute paths in filesy... Justus Schwartz
- Re: [boost] Re: relative/absolute paths in fi... Beman Dawes