gpt4 book ai didi

vb.net - 如何在没有 API 的情况下查找 OneDrive (SkyDrive) 和 GoogleDrive 文件夹?

转载 作者:行者123 更新时间:2023-12-02 06:55:14 24 4
gpt4 key购买 nike

感谢这篇文章,

How do I programmatically locate my Dropbox folder using C#?

我可以通过编程方式找到 Dropbox 文件夹。现在,在不安装和使用各种 API 的情况下,如何对 GoogleDrive 和 MS SkyDrive 执行相同操作?

Vb.Net 或 C# 解决方案都可以...

最佳答案

我在这里找到了部分答案...

How do I programmatically locate my Google Drive folder using C#?

这是我的三个主要 Webfolder 服务的代码

Dim StoreFolder As String = ""
' Dropbox
Dim dbPath As String = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Dropbox\\host.db")
Dim lines() As String = System.IO.File.ReadAllLines(dbPath)
Dim dbBase64Text As Byte() = Convert.FromBase64String(lines(1))
StoreFolder = System.Text.ASCIIEncoding.ASCII.GetString(dbBase64Text)

' SkyDrive
StoreFolder = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\SkyDrive", "UserFolder", Nothing)

' Google Drive
Dim dbPath As String = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Google\\Drive\\sync_config.db")
File.Copy(dbPath, "temp.db", True)
StoreFolder = File.ReadAllText("temp.db", System.Text.Encoding.ASCII)
StoreFolder = StoreFolder.Substring(StoreFolder.IndexOf("local_sync_root_pathvalue") + 29)
StoreFolder = StoreFolder.Substring(0, StoreFolder.IndexOf(Char.ConvertFromUtf32(24)))

关于vb.net - 如何在没有 API 的情况下查找 OneDrive (SkyDrive) 和 GoogleDrive 文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13454508/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com