/// <summary> /// Returns true if the file exists on either the disk or in the assembly /// </summary> /// <param name="filename"></param> /// <returns></returns> public bool FileExists(string filename) { bool isFile = File.Exists(filename); bool isManifest = ManifestReader.Exists(filename); return(isFile || isManifest); }
/// <summary> /// Returns the byte stream of the file specified /// </summary> /// <param name="filename"></param> /// <returns></returns> public Stream GetStream(string filename) { if (File.Exists(filename)) { Logger.Log(LogType.Log, filename + " Found in File System.", 5); return(File.OpenRead(filename)); } if (ManifestReader.Exists(filename)) { Logger.Log(LogType.Log, filename + " Found in Assembly Manifest.", 5); return(ManifestReader.GetStreamByPath(filename)); } throw new InvalidFilePathException(filename); }