Created
March 2, 2014 13:14
-
-
Save abjerner/9306381 to your computer and use it in GitHub Desktop.
Small snippet for finding the path to the user's local Dropbox folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static string GetDropboxPath() { | |
string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); | |
string dbPath = Path.Combine(appDataPath, "Dropbox\\host.db"); | |
if (!File.Exists(dbPath)) return null; | |
string[] lines = File.ReadAllLines(dbPath); | |
return Encoding.UTF8.GetString(Convert.FromBase64String(lines[1])); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment