Example #1
0
 /// <summary>
 /// Saves the contents in the file with the given <paramref name="fileName"/>.
 /// </summary>
 /// <param name="fileName">The name of the file to save the contents into.</param>
 public void Save(string fileName)
 {
     if (IsPlatformSwitch)
     {
         using (ResFileSaver saver = new Switch.Core.ResFileSwitchSaver(this, fileName)) {
             saver.Execute();
         }
     }
     else
     {
         using (ResFileSaver saver = new WiiU.Core.ResFileWiiUSaver(this, fileName)) {
             saver.Execute();
         }
     }
 }
Example #2
0
        // ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------

        /// <summary>
        /// Saves the contents in the given <paramref name="stream"/> and optionally leaves it open
        /// </summary>
        /// <param name="stream">The <see cref="Stream"/> to save the contents into.</param>
        /// <param name="leaveOpen"><c>true</c> to leave the stream open after writing, otherwise <c>false</c>.</param>
        public void Save(Stream stream, bool leaveOpen = false)
        {
            if (IsPlatformSwitch)
            {
                using (ResFileSaver saver = new Switch.Core.ResFileSwitchSaver(this, stream, leaveOpen)) {
                    saver.Execute();
                }
            }
            else
            {
                using (ResFileSaver saver = new WiiU.Core.ResFileWiiUSaver(this, stream, leaveOpen)) {
                    saver.Execute();
                }
            }
        }