We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
POCO 具有类似的功能,您可以在 Foundation/FileSystem 下找到。
POCO has similar functionality which you can find under Foundation/FileSystem.
至少还有一个解决方案值得一提 -
STLSoft
,一套类似 BSD 的解决方案许可库,包含 Windows 和 Windows 下的跨平台包装器。 Unix 本机文件系统 API -PlatformSTL
项目。与boost::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 withboost::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.QT 的
QFileSystemModel
或 QFSFileEngine?What about QT's
QFileSystemModel
or QFSFileEngine?您可以在 SSVUtils 库中找到它:https://github.com/SuperV1234/SSVUtils
You can find it in the SSVUtils library: https://github.com/SuperV1234/SSVUtils
我发现,对于需要比语言中定义的文件系统 API 更多的应用程序来说,自己在每个应用程序级别封装文件系统 API 是有意义的。
因为在这种情况下,您通常需要一些非常具体的功能(您肯定在 iPhone/MacOSX 上这样做),而这将不是很便携,并且也会被 boost 和其他功能错过。在这种情况下,您需要在抽象层中走得更高一些。
如今,操作系统 API 不再那么糟糕了。编写包装器应该不会花很长时间。
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.