/// <summary> /// Gets the path of the given FileType by ID /// </summary> public static string GetPath(Guid ID, PackageFileType file) { //get filename for type Common.PackageFiles.TryGetValue(file, out string filename); string path = Path.Combine(Common.App_Data, ID.ToString(), filename); //return path as string return((File.Exists(path)) ? Path.Combine(Common.App_Data, ID.ToString(), filename) : string.Empty); }
/// <summary> /// Get the contents of the given FileType by ID /// </summary> public static string GetFileContents(Guid ID, PackageFileType file) { //get filename for type Common.PackageFiles.TryGetValue(file, out string filename); string path = Path.Combine(Common.App_Data, ID.ToString(), filename); //read and return the file return((File.Exists(path)) ? File.ReadAllText(path) : string.Empty); }
public PackageFileData(PackageFileType type, string url, string guid) : this(type, url) { this.guid = guid; }
public PackageFileData(PackageFileType type, string url) { this.type = type; this.url = url; }