The Boost.Filesystem library provides facilities to manipulate files and directories, and the paths that identify them.
Questions tagged [boost-filesystem]
353 questions
0
votes
1 answer
Boost Include_DIR for CMake
Can someone tell me why I cannot succeed in including Boost in CMake. I have problem when I configure in CMake.

Eray Tuncer
- 707
- 2
- 11
- 31
0
votes
1 answer
Boost filesystem failed silently because the "C++ language dialect" was set to an incompatible setting. How to make it not silent when this happens?
I had spent some time trying to get simple boost filesystem operations working, and managed successfully by changing the project settings in XCode. For reference, here is my code that uses boost::filesystem:
namespace bfs =…

usm
- 245
- 2
- 17
0
votes
1 answer
Equivalent of boost::file_system::no_check in boost::filesystem V3?
boost::filesystem::no_check does not seem to exist in boost::filesystem version 3 (boost v1.54). What is the appropriate equivalent in the newer version of the library?

cschol
- 12,799
- 11
- 66
- 80
0
votes
1 answer
how detect file change or remove in linux system
On a UNIX system, everything is a file; if something is not a file, it is a process.
this is an advantage of linux file system, but a have a question here !!
how can I detect if a file has been created or changed or removed by user or program ?
I…

Anis_Stack
- 3,306
- 4
- 30
- 53
0
votes
2 answers
C++/boost: checking process permission
I'm writting a C++ program in order to make some static analyse and modifications over a website. I don't change the project files, but the files are copied, analysed and modified in a new folder.
Is there a way of checking, for example, using…

ABu
- 10,423
- 6
- 52
- 103
0
votes
1 answer
Porting access(2) Linux system call to boost::filesystem
Currently, I have an application which I am porting from Linux to Windows. I would prefer to use boost where possible.
I currently have the following snippet which I want to port, which is pretty self-explanatory.
return access(backupFile.c_str(),…

Damien
- 785
- 3
- 8
- 18
0
votes
1 answer
boost filesystem get permissions returns (509)dec == (1FD)hex. This value is not in the documentation
Reading here boost filesystem. The value of 509 does not exist.
The code that is doing this is:
boost::filesystem::path closest_existing_path = log_dir; …

Matthew Hoggan
- 7,402
- 16
- 75
- 140
0
votes
1 answer
Boost filesystem exists always returning false on Windows
Everything compiles file. But when I step through the code in Visual Studio 12, the line where Boost checks if the folder actually exists jumps the else statement. The folder is in the correct path (same path as the .exe), and if I remember…

Nuzut
- 31
- 6
0
votes
2 answers
boost::filesystem::path accepts wstring on linux machine
As per the boost documentation char is used on unix systems for boost::filesystem::path internal value type. But on linux the following code compiles and also works properly.
const std::wstring &m_blobStore;
boost::filesystem::path…

Talespin_Kit
- 20,830
- 29
- 89
- 135
0
votes
1 answer
Infinite recursion when I build an absolute path using boost
I needed a function to get the absolute path and for that purpose I had a look in boost but it only has that in recent version and I'm using an old 1.44. As I cannot update my code on recent boost 1.55 or higher, I decided to re-write that…

alexbuisson
- 7,699
- 3
- 31
- 44
0
votes
1 answer
boost::filesystem::directory_interatory i(path) crashes on start up in qt creator
for(directory_iterator i(l_path),end_iter; i != end_iter; i++){
string im_name = filename;
//string im_name = i->path().filename().string();
string l_filename = l_path + im_name;
im_name.replace(im_name.begin(),im_name.begin() +…

tengence
- 61
- 9
0
votes
0 answers
How to determine file extension is showed or not with boost filesystem
My Question is simple. How me know that the given file path, its extension is showed on Windows explorer or not, using boost filesystem library.
I know answer with Shell:
SHELLFLAGSTATE shellSettings = {0};
SHGetSettings(&shellSettings,…

Khurshid
- 2,654
- 2
- 21
- 29
0
votes
1 answer
boost filesystem how to access shared folders
I'm looking for this and I couldnt find anything to help me. I think it is simple, what i need to do is to show the shared folders in my network, using boost libraries.
For example
std::string dir = "/home/user";
for…

Safej
- 73
- 10
0
votes
1 answer
Boost Filesystem createdirectories on Linux replacing "/" with "\"
When using Boost Filesystem's createdirectory (and createdirectories) function in the following example, "/" is being replaced with "\".
boost::filesystem::path path ("/data/configSet");
boost::filesystem::create_directory(path);
This code snipped…

Dave
- 3
- 1
- 2
0
votes
1 answer
How do I avoid storing redirections in a boost::filesystem::path?
I'm using Boost::Filesystem to traverse around directories in Linux.
Every time I need to re-define the path to be one directory back, I do something similar to this:
auto p = boost::filesystem::current_path();
p /= "../";
The problem is, that…

Trevor Hickey
- 36,288
- 32
- 162
- 271