HashSet
that comes built into .NET Framework, or you could build your own data structure. If you have tons and tons of files already in Google Drive, then implementing a Bloom filter in front of your lookup may help speed things up -- but that is an optimization for later.HashSet
first. See if it is fast enough.Init:
while (files available in Google Drive)
download file data from Google Drive.
compute hash file data
put hash in data structure
OnFileUploadAttempt:
compute hash of file to be uploaded
if data structure does not contains hash
upload file
似乎对我非常有帮助,因为它甚至具有适用于各种语言和平台的示例代码。例如,如果您知道文件的ID,如何下载文件:因为谷歌驱动器API文档不是那么有用,我对C#还是很陌生