Boost logo

Boost Users :

Subject: [Boost-users] [filesystem] Using filesystem library from Boost version 1.44 on Cygwin 1.7
From: Clarke, Carus V (carus.v.clarke_at_[hidden])
Date: 2010-08-30 10:57:42

Date: Fri, 27 Aug 2010 15:39:29 -0700
From: Steven Watanabe <watanabesj_at_[hidden]>
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [filesystem] Using filesystem library from Boost version 1.44 on Cygwin 1.7
Message-ID: <4C783EA1.4070400_at_[hidden]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


Clarke, Carus V wrote:
> I have been using the filesystem library from Boost version 1.43 on a Cygwin 1.7.6-1 platform without any problems. The library was built using the Cygwin version of GCC 4.3.4. The library from the 1.44 version of Boost compiles compiles o.k., but the functions that access files no longer work. This appears to be true for both versions 2 and 3 of the library. Below is a simple program that runs o.k. with the Boost version 1.43 version of the library. The program runs but can not read the file status using Boost version 1.44. This program also works fine when built using MSVC 9.0 and Boost version 1.44.
> //--------------------
> <snip>
> int main()
> {
> <snip>
> std::cout << "Error code message: " << ec.message() << std::endl;
> return 0;
> }
> //--------------------
> This program's output on my system is shown below. The file 'foo' is written by the program and does actually exist.
> For version 2:
> boost::filesystem library version is v2
> Checking status of file foo...
> Error code value: 0
> Error code message: The operation completed successfully
> Does file exist? false

Your code doesn't appear to print this last line.

In Christ,
Steven Watanabe


You are right. I added the last line after pasting in the code. Here it is:

   boost_fs::file_status st = boost_fs::status(path, ec);
   std::cout << "Does file exist? " << boost_fs::exists(st) << std::endl;
   return 0;

Is there anything I can do to make this work?


Carus V. (Bud) Clarke


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at