如何在没有API的情况下找到OneDrive(SkyDrive)和GoogleDrive文件夹? [英] How do I find the OneDrive (SkyDrive) and GoogleDrive folders without the API?
问题描述
感谢这篇文章,
我可以通过编程的方式找到Dropbox文件夹。现在,在没有安装和使用各种API的情况下,GoogleDrive和MS SkyDrive应如何实现?
Vb.Net或C#解决方案都可以...
我在这里找到了答案的一部分...
$ b
如何以编程方式找到使用C#的Google云端硬盘文件夹? 这是我的三个主要Webfolder服务的代码 Thanks to this article, How do I programmatically locate my Dropbox folder using C#? I can programmtically find the Dropbox folder. Now, without installing and using various APIs, how can I do the same for GoogleDrive and MS SkyDrive? Vb.Net or C# solutions are OK... I found part of the answer here... How do I programmatically locate my Google Drive folder using C#? Here is my code for three of the main Webfolder services
这篇关于如何在没有API的情况下找到OneDrive(SkyDrive)和GoogleDrive文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
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)))
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)))