Is there any good boost::filesystem alternative? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any portable c++ library to work with the filesystem?
I know about boost::filesystem, but I need to know if there is any other.
Thanks!

POCO has similar functionality which you can find under Foundation/FileSystem.

There is at least one more solution worth mentioning - STLSoft, a set of BSD-like licensed libraries, contains a cross-platform wrapper under Windows & Unix native filesystem APIs - PlatformSTL project. The benefit in comparison with boost::filesystem is no need to build anything, the whole library is header-only, you can simply include it in your project. The bad side is lack of documentation though, I spent quite some time to figure out how to use it.

What about QT's QFileSystemModel or QFSFileEngine?

You can find it in the SSVUtils library: https://github.com/SuperV1234/SSVUtils

I found that for an application which needs a lot more than the filesystem API defined in the language it makes sense to encapsulate the filesystem API yourself and on a per application level.
Because in this case you usually need some very specific features (you surely do on the iPhone/MacOSX) and this will be not very portable and also missed by boost and others. In this case you need to go a bit higher in your abstraction layer.
Today the operating system API isn't that bad anymore. Writing a wrapper shouldn't take long.

Related

How to read/interrogate a filesystem and file structure [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
As a first time programming using vi with a raw Linux terminal in C++, what is the simplest way to recurse through a filesystem and get results such as file size, date, directory date etc?
I imagine I'm missing a library or two that would handle this pretty cleanly which would be great to know. Even better would be knowing where to find a solid reference for the basics like this.
If you have a modern compiler you can use std::filesystem:
https://en.cppreference.com/w/cpp/filesystem
Otherwise you can use boost::filesystem, which is very similar but non standard:
https://www.boost.org/doc/libs/1_67_0/libs/filesystem/doc/index.htm
Boost is a collection of libraries with various purposes and a focus on quality. Boost libraries regularly end up in the new C++ standards so it's good thing to learn.
You might consider (on Linux at least) to use nftw(3). You could use opendir(3) + readdir(3) + closedir with stat(2) (and nftw is using all these). See also syscalls(2) (and read some Linux programming book, perhaps the old ALP). Notice that on Linux (and POSIX systems), the operating system API is in C, not in C++.
Of course, you might use the C++ functions given in f4's answer (they are are based on functions above).
And you could use C++ frameworks such as boost, poco, Qt (also using the functions above).

Cross platform way to create file dialog in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am writing an application in which I need to be able to browse for an existing file and to create a new one. I need to create user interface for that. Is there any good cross-platform free library to help me do that?
If you're not already using a cross-platform UI library, then it doesn't make a lot of sense to introduce a dependency upon a huge library just to display a file dialog.
Since recommendations for a cross-platform UI library have already been hashed out repeatedly in other questions (use the search feature to find them if you're interested) and are probably off-topic anyway,
I'm going to take the liberty of assuming that such is not your question.
Therefore, the answer is that no, there is no reliable, cross-platform way of creating a file dialog. Each platform provides a different interface/API for this, so you'll need to write code to detect the current platform and then display the dialog as instructed by each platform's documentation.
You can do this either at run-time (if you want to have a single binary), or at compile-time by using conditional compilation (#if statements).
This is basically all that any UI library would be doing, and for such a simple requirement (a single feature) it makes sense to me at least to just do that work yourself.
You can give wxWidgets a try, a GUI library in C++, free, open-source,... and work with the native graphics libraries.

C++ Library for XML-RPC [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
There is a list of C++ XMLRPC implementations in Wikipedia:
Libiqxmlrpc
Ultra lightweight XML-RPC library for C++
XML-RPC for C and C++
XmlRpc++
XmlRpc C++ client for Windows
gSOAP toolkit for C and C++ supporting XML-RPC and more
libmaia: XML-RPC for Qt/C++
I wonder that people use which of these libraries most. Do you have experience with these libraries?
I've used gSOAP in the past. I found it pretty nice to work with. It's fairly mature and runs on a variety of platforms. I thought the documentation, along with examples to be sufficient. We used it on a project that needed to communicate with ASP.NET web services from a Linux environment.
I think that xmlrpc++ is what you're looking for. Though I can't give objective comparison to every library listed here, I must say that's it's extremely versatile, well-written and somewhat easy to get used to.
Well, it actually some kind of lacks in documentation, but this is also subjective (hate this doxygenized way of presenting information).
Added : ulxmlrpcpp also (never used it, just looked through documentation) seems fine and well-designed.

What are some small, fast and lightweight open source applications (µTorrent -esque)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Possible duplicate
What is the best open source example of a lightweight
Windows Application?
µTorrent is a small bit-torrent client, a really small one. It doesn't come with an installer, just a exe, you drop in your PATH somewhere. It's super lightweight and yet feature rich. Plus it is the work of one man. It's also closed-source.
Many people have been curious about how it has been written, and there are hints here and there about a custom library etc. But the question is, are there any programs with attributes like µTorrent that are available with source code--attributes like speed, small size, awesomeness.
Possible related question (/questions/9603/what-is-some-great-source-code-to-read), but think smaller than something like the Linux kernel.
Clarification: I don't want examples of bit-torrent source code, but anything which is used by tons of people (validation of awesomeness) and also fast, small and awesome!
I think you should take a look at Notepad++ if you want to see a feature-rich low-consumption of power software :)
Netcat
It's the program that started all of the curiousity behind networks and how things WORK.
Everyone's looked at this source code.
rTorrent is a lightweight, feature-rich, console-only open-source torrent client.
I like Frhed, a simple open-source Windows hex editor.
FRESHMEAT is a great place to start. There are lots of small open source programs available that you can study.
Examples:
XML-RPC specification.C implementation for Python. Its easy to learn and its fun.
Heapq [\Lib\heapq.py] , xml-rpc [\Lib\xmlrpc] and lots of other codes in Python library are very well written.

qpThreads documentation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there any documentation on qpThreads? In what way is it different from pthreads?
It looks like qpthread has become a sourceforge project. It hasn't changed in four or five years from the CVS repository and doesn't seem to contain any documentation. Chances are that if you don't have docs on it, then none exist save for the source code and headers of course.
I grabbed the source out of curiosity and it looks like a pretty standard threading implementation that is layered over pthreads. The largest difference is that pthreads is a C-style interface and qpThreads is an OO interface more akin to what you might find in Java. I haven't delved into it very deeply, but you might want to look at the interfaces like java.util.Timer and java.util.concurrent. Some of the interfaces look quite similar to what qpThreads offers.
You might want to investigate replacing it with Boost.thread or something more recent. Chances are that you will have better luck maintaining it. It shouldn't be that hard to do depending on how much code you have to deal with.
From a cursory look at google search results, qpThreads seems to be an obscure C++ threading class library. pthreads is a very widely used, POSIX-compliant, multi-platform threading C API.
The most important thing about using libraries is making sure they are actively maintained.
You should use a well known and heavily used library if possible. This way you will also have a vast number of people to ask questions if you have any.
Please see this similar SO question for more details:
Good c++ lib for threading (or use the search box for more).
Found some documentation finally.
Sourceforge qpthreads