Beispiel #1
0
        /// <summary>
        /// Reads a file from the mod
        /// </summary>
        /// <param name="resourcePath">Path of the resource file, relative to the directory in which the mod.json or the modpack.json is located.</param>
        /// <returns>A stream allowing access to the resource data</returns>
        public Stream ReadResourceStream(string resourcePath)
        {
            var absolutePath = Path.Combine(GetBaseDirectory(), resourcePath);

            return(fileSystem.OpenFileReadOnly(absolutePath));
        }