Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
 public PackageFileData(PackageFileType type, string url, string guid) : this(type, url)
 {
     this.guid = guid;
 }
Пример #4
0
 public PackageFileData(PackageFileType type, string url)
 {
     this.type = type;
     this.url  = url;
 }
Пример #5
0
 public PackageFileData(PackageFileType type, string url, string guid) : this(type, url)
 {
     this.guid = guid;
 }
Пример #6
0
 public PackageFileData(PackageFileType type, string url)
 {
     this.type = type;
     this.url = url;
 }