Boost logo

Boost Users :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-07-01 08:29:32


"Saurabh Sood" <ssoodd_at_[hidden]> wrote in message
news:f002beb105063021185d789304_at_mail.gmail.com...
> Hi all,
>
> Input : dir_path
> \code
> boost::filesystem::path p(dir_path, boost::filesystem::native);
> boost::filesystem::directory_iterator i(p), j;
> while (i != j) {
> std::cout << i->string(); // Output
> ++i;
> }
> \endcode
>
> On Windows XP,
> If input dir_path is "d:\" , the i->string() returns complete path of
> all files and directories.
> BUT,
> If input dir_path is "d:" , the i->string() returns relative path of
> all files and directories.
>
> Please check if this is desired behaviour or not !!

That is the expected behavior. It isn't a bug.

If a complete path is desired, one can be created via the complete() or
system_complete() functions.

HTH,

--Beman


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