Sv: g++ and c++17 filesystem

René Berber
Wed Nov 18 16:24:38 GMT 2020

On 11/18/2020 3:00 AM, Kristian Ivarsson via Cygwin wrote:

>> On 11/17/2020 9:15 AM, Kristian Ivarsson via Cygwin wrote:
>>> The filesystem-library as a part of C++17 seems to have some defects
>>> and flaws in the cygwin-package and pretty much every lexical- and
>>> canonical operation works in mysterious ways (or not at all)
>> [snip]
> So by this you're saying that cygwin-applications cannot handle the
> filesystem it is supposed to handle ?

I'm not saying anything, I'm pointing to the relevant documentation.

> How come std::filesystem first say "It's a valid file" followed by "It's not
> a valid file" ? Is that part of the "circumvention" ?

The documentation states that using Windows notation is not supported 
and may result in unexpected results (i.e. sometimes work, sometimes 

> In the current use case, the path is even returned from
> std::filesystem::directory_iterator where it says "Hey, here's a path to a
> file I found in the folder you pointed out" followed by "The path I just
> gave to you is not a valid path"
> It's gonna be tricky to implement applications in that way

The problem is that your assumptions and expectations are wrong.  Not 
knowing Cygwin that is expected.

Cygwin handles the file system with no problem, but using Posix-like 
notation, not Windows-like.  End of story.

More information about the Cygwin mailing list