使用C同步文件夹

发布于 2024-09-01 23:47:51 字数 53 浏览 2 评论 0原文

我想使用 C 同步两个文件夹的内容。我没有任何代码行,我只是希望有人建议一个好的教程来开始。

I want to synchronize the contents of two folders using C. I don't have any line of code, I simple want someone to suggest a good tutorial to start with.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

2024-09-08 23:47:51

首先,没有“C”方法可以做到这一点。您将需要使用依赖于平台的文件系统函数。您运行什么操作系统?

在 Linux 系统上,尝试 opendir 和朋友(来自 dirent .h)。

在 Windows 系统上,请尝试此列表 Win32 文件管理功能。

First of all, there is no 'C' way to do this. You will need to use platform-dependent filesystem functions. What OS are you running?

On Linux systems, try opendir and friends (from dirent.h).

On Windows systems, try this listing of Win32 File Management functions.

与之呼应 2024-09-08 23:47:51

您需要了解 dirent.hstat。谷歌搜索我发现此链接

You need to learn about dirent.h and stat. Googling for those I found this link.

听风吹 2024-09-08 23:47:51

我建议不要编写代码,而是使用Sync Butler

否则,您可能需要在 Boost 库中搜索任何独立于平台的访问文件夹的方法(因为您没有告诉我们您正在使用哪个操作系统或平台)。

I suggest not writing code, but using Sync Butler.

Otherwise you may want to search the Boost library for any platform independent methods for accessing folders (since you didn't tell us which OS or platform you are using).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文