在 C++ 中将文件 URL 转换为 BOOST 文件系统路径的最佳方法是什么?

发布于 2024-08-23 12:11:52 字数 143 浏览 5 评论 0原文

我正在编写一个以文件名作为输入的库。我试图包含的一项功能是允许用户传入文件 URL 或文件路径,因为有时输入是通过解析 XML 生成的,有时则不是。我正在使用 boost 文件系统来操作路径,并且想知道将文件 URL 转换为 boost 文件系统路径对象的最佳方法是什么。

I'm writing a library that has filenames as inputs. One feature that I'm trying to include is to allow the user to pass in file URLs or file paths, because sometimes the input is generated from parsing XML, other time it's not. I'm using the boost filesystem to manipulate the path, and is wondering what is the best way to convert a file URL to a boost filesystem path object.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文