Skip to main content
3 votes
1 answer
120 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
149 views

Assume 2 threads, t1 and t2, mutex m and file f running on a RPi. t1 waits at m, creates a file f with some content, close f and verify that f exists. Finally m is relased and t1 does a short delay to ...
M Webjorn's user avatar
1 vote
4 answers
133 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
117 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
  • 24.7k
3 votes
1 answer
131 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
406 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,533
1 vote
1 answer
115 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.3k
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
126 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,205
0 votes
1 answer
126 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
418 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
  • 366
1 vote
0 answers
119 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
121 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
201 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
141 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