public BisFile(ref OpenFileDialog fileDialog, BisTypes type) { path = fileDialog.FileName; this.type = type; size = (ulong)new FileInfo(path).Length; }
static public void Validate(BisFile file, BisTypes type) { if (file == null) { throw new Exception($"No {type} has been selected!"); } if (!File.Exists(file.path)) { throw new Exception($"Invalid path for {type}"); } }
public BisFile(string path, BisTypes type, ulong size) { this.path = path; this.size = size; this.type = type; }