Questions tagged [boost-filesystem]

The Boost.Filesystem library provides facilities to manipulate files and directories, and the paths that identify them.

0
votes
0answers
22 views

boost::filesystem::remove_all() and std::filesystem::remove_all() behave differently on Visual Studio 2017

Microsofts implementation of std::filesystem::remove_all() seems to give different return values than the original boost::filesystem::remove_all() when removing directories that are empty except for ...
0
votes
1answer
115 views

Cannot use the C++ `std::filesystem` library with Meson build

I am trying to build a piece of C++ code that uses the new C++17 Filesystem library, using the Meson build system.This is the piece of meson.build file involved:if not compiler.has_header('...
2
votes
1answer
77 views

boost::filesystem::current_path() returns empty path

I have a C++ program where I need the current path to later create a folder. The location of my executable is, let's say /home/me/foo/bin. This is what I run://Here I expect '/home/me/foo/bin/', but ...
1
vote
1answer
67 views

Inconsistent behavior of std::regex

I have the following issue where:std::regex behaves differently if I pass the result of boost::filesystem::path::string() vs storing the result in a intermediate string variable. The first will ...
0
votes
1answer
45 views

Program using boost::filesystem links with clang but not gcc

I have an extremely simple program using boost::filesystem, taken from the library's tutorialhttp:// fs_example.cpp#include <boost/filesystem.hpp>#include <iostream>using namespace boost:...
4
votes
2answers
180 views

How to compare time_t and std::filesystem::file_time_type

I'm converting some code over from boost::filesystem to std::filesystem. Previous code used boost::filesystem::last_write_time() which returns a time_t so direct comparison to a time_t object I ...
0
votes
1answer
62 views

how to convert a string into a directory? boost on Linux

I am having trouble converting a path into a directory on Linux using a boost. below is my code, this directory exists in my folder but somehow not recognised as directory as it always print out PATH ...
2
votes
1answer
75 views

boost filesystem - How to get last write time for symlink without resolving?

Suppose we have 2 files:lrwxrwxrwx 1 ... 3 Jun 8 09:42 d3 -> dird--------- 3 ... 80 Jun 9 16:14 dirOne is a symlink to a directory, and another is the actual directory.When I write...
-4
votes
2answers
381 views

boost::filesystem::create_directory threw a boost::filesystem::filesystem_error: Bad address

The TL;DR of my code is the following:server::server(boost::filesystem::path mappath) : mappath(mappath) {if(boost::filesystem::is_directory(mappath) && boost::filesystem::exists(...
0
votes
0answers
27 views

Own program prints different directory sizes than DU [duplicate]

I made a little c++ project to print the sizes of directories and files ordened. However, I noticed that I get a difference in size for what du reports and what my program, using boost::filesystem, ...
0
votes
0answers
46 views

boost::filesystem::has_filename() can get confused if directory contains a period

Assume a boost::filesystem::path foo points to an existing folder like:/Applications/My Program 6.5foo.is_directory() will be true, but both foo.has_filename() and foo.has_extension() will also be ...
0
votes
1answer
121 views

Linker error when compiling with Boost.Filesystem on macOS High Sierra

I'm currently trying to compile a program that uses Boost.Filesystem on macOS High Sierra 10.13.4. I'm also using gcc 7.3 to compile, which I manually installed using Homebrew. The program will ...
0
votes
0answers
147 views

Boost Filesystem Not Working on Mac OS X

I am trying to use boost::filesystem (specifically to traverse a directory) and it does not seem to be working.Example program:#include <iostream>#include <boost/filesystem.hpp>...
1
vote
1answer
80 views

boost last_write_time is back one hour

I have trying to solve a bug on the following code, where I get an hour difference from boost last_write_time.To explain it better: I create a file, and then I try to extract the time it was created ...
0
votes
1answer
250 views

Error while building boost for android arm architectures

Why am I getting these errors only when building some particular boost libraries like filesystem for arm ?error: no member named 'fgetpos' in the global namespaceerror: no member named 'fsetpos' in ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,