Skip to content

Instantly share code, notes, and snippets.

@idiotandrobot
Last active April 19, 2016 09:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Dropbox Windows Folder path
using Newtonsoft.Json.Linq;
using System;
using System.IO;
public static class Dropbox
{
private static string _Path;
public static string Path
{
get { return _Path ?? (_Path = GetPath()); }
}
static string GetPath()
{
var appDataPath = Environment.GetFolderPath(
Environment.SpecialFolder.LocalApplicationData);
var filePath = System.IO.Path.Combine(appDataPath, @"Dropbox\info.json");
dynamic dropboxInfo = JObject.Parse(File.ReadAllText(filePath));
string folderPath = dropboxInfo.personal.path;
return folderPath;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment