public Reader(string magicFilename, EMagicFileType fileType) { if (File.Exists(magicFilename)) { switch (fileType) { case EMagicFileType.Json: _types = ReadJson(magicFilename); break; case EMagicFileType.Original: _types = ReadOriginal(magicFilename); break; } } else { throw new FileNotFoundException($"File does not exist: {magicFilename}"); } }
public MimeMagicSharp(EMagicFileType magicFileType, string magicFilePath) { _mimeReader = new Reader(magicFilePath, magicFileType); }