Dropbox 如何实现这两个功能(更改图标并仅发送文件更改的差异。)
DropBox 是如何实现这两个功能的(高级答案即可):
在 Windows 上同步后获取要更改的文件图标? (我猜类似的答案也适用于其他操作系统)
仅发送对文件所做的更改而不是整个文件?
对于2,我猜测它是通过在客户端使用类似于 diff 的东西并发送输出来工作的......
How did DropBox implement these two features (a high-level answer is fine):
Get the icon of a file to change once it's synchronised on Windows? (I am guessing similar answers would apply to the other OSs)
Send only the changes done to a file and not the whole file?
For 2, I am guessing that it worked by using something similar to diff on the client side, and sending the output...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
至于第一个问题,它是使用 图标完成的覆盖处理程序。 codeproject 中有一个示例,您还可以查看精彩的 < a href="http://code.google.com/p/tortoisesvn/source/browse/trunk/src/TortoiseShell/IconOverlay.cpp" rel="nofollow">TortoiseSVN source,它实现了这样的处理程序。
As for the first question, it's done using an icon overlay handler. There's an example in codeproject, and you can also take a look at the great TortoiseSVN source, which implements such a handler.
仅发送对文件的修改是通过所谓的 滚动校验和/哈希 来完成的,这是一个示例可以远程比较文件并仅发送差异的程序是rsync。
Only sending modifications to a file is accomplished with something called a Rolling Checksum / Hash, an example of a program that can remotely diff a file and only send the differences is rsync.