Skip to main content
3 votes
1 answer
138 views

I stumbled upon different behavior of std::filesystem::path::parent_path() when a path contains leading slashes. Clang says that the parent of ///a is /// (which is what I would expect), but GCC says ...
danpla's user avatar
  • 705
0 votes
1 answer
166 views

Assume two threads, t1 and t2, mutex m, and file f running on an RPi. t1 waits at m, creates a file f with some content, closes f, and verifies that f exists. Finally, m is released, and t1 does a ...
M Webjorn's user avatar
1 vote
4 answers
217 views

I am currently working with QPixmap to set an image to a label, but improvising a way around since my qrc file isn't working. I am trying to access the image folder in the project directory and trying ...
Ian Mwendwa's user avatar
0 votes
0 answers
137 views

Based on cppreference, I was under impression that std::canonical and std::weakly_canonical return the input path if it is an absolute directory path to existing directory that has no dot, dot-dot ...
Fedor's user avatar
  • 25.7k
3 votes
1 answer
211 views

When using std::filesystem::{recursive_}directory_iterator, it's common to want to filter the results based on some pattern. I typically implement it something like: template <typename ...
shuffle2's user avatar
8 votes
0 answers
614 views

I have compared the description of POSIX mkdir against the description of std::filesystem::create_directory, the specification draft for std::filesystem::create_directory, and the specification draft ...
Adam Badura's user avatar
  • 5,543
1 vote
1 answer
131 views

I have a function that reports errno errors: void reportError(int err, const std::wstring& fname); The pattern of invocation goes like this: int fd = open(fileName.c_str(), O_RDONLY); if (...
j6t's user avatar
  • 14.5k
26 votes
2 answers
2k views

In the std::filesystem::path::extension() page on cppreference.com, it says the following: On a non-POSIX system, it is possible that p.stem() + p.extension() != p.filename() even though generic-...
Arlo Taylor's user avatar
3 votes
0 answers
143 views

I'm trying to use the C++ filesystem API to figure out if some paths are relative to the current directory or not. I thought I might be able to use the std::filesystem::relative() API but it's giving ...
Maks Verver's user avatar
  • 1,215
0 votes
1 answer
133 views

How can I change the language on which std::filesystem::filesystem_error creates message? By default it creates message on my native language and when I try to output it to console - it messes up the ...
Victor's user avatar
  • 35
-2 votes
1 answer
569 views

I stumbled over a boost related problem when building with cmake (in Msys2). a bit of history: It started with a tool I developed in linux and now I want to build it also in msys for windows. Here I ...
schnedan's user avatar
  • 376
1 vote
0 answers
160 views

I want to know if checking multiples files in a directory using a std::unordered_set of files names using std::filesystem::directory_iterator is faster than using std::filesystem::exists. There's some ...
Bruno Xavier's user avatar
0 votes
1 answer
165 views

Given an instance of std::filesytem::path in a Linux environment, what exactly do the root_name, root_directory, and root_path methods return? I understand that in the Linux/POSIX environment, the UNC ...
crsguy's user avatar
  • 29
1 vote
1 answer
249 views

For the below code: std::error_code ec; auto long_path = std::filesystem::canonical("W:\\31\\arawat.fielsystem_default_check\\matlab\\check_std\\check_std\\").string(); I am getting the ...
Atul Rawat's user avatar
1 vote
2 answers
155 views

I am at a very early stage in writing a C++ program replicating the most basic functions of the ls bash command. I use the <filesystem> header. The std::filesystem::directory_iterator and std::...
Giogre's user avatar
  • 1,664

15 30 50 per page
1
2 3 4 5
14