public static string CreateDirectory(VocabulaDirectories directory) { var path = GetDirectory(directory); //Create directories if they don't already exist Directory.CreateDirectory(path); return(path); }
public static string GetDirectory(VocabulaDirectories directory) { switch (directory) { case VocabulaDirectories.VocabulaUserDocuments: string userDocumentsPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); return(Path.Combine(userDocumentsPath, _vocabulaSubfolder)); default: throw new NotSupportedException(directory + " is not a supported directory"); } }