LoadFromFolder() public static method

Loads CDLC artifacts from folder into DLCPackageData
public static LoadFromFolder ( string unpackedDir, System.Platform targetPlatform, System.Platform sourcePlatform = null, bool ignoreMultitoneEx = false ) : DLCPackageData
unpackedDir string
targetPlatform System.Platform
sourcePlatform System.Platform
ignoreMultitoneEx bool Ignore multitone exceptions
return DLCPackageData
        private static void ConvertPackageRebuilding(string unpackedDir, string targetFileName, Platform sourcePlatform, Platform targetPlatform, string appId)
        {
            var data = DLCPackageData.LoadFromFolder(unpackedDir, targetPlatform, sourcePlatform);

            // Update AppID
            if (!targetPlatform.IsConsole)
            {
                data.AppId = appId;
            }

            // Build
            DLCPackageCreator.Generate(targetFileName, data, new Platform(targetPlatform.platform, GameVersion.RS2014));
        }
        /// <summary>
        /// Fixes missing and updates showlights to current standards
        /// </summary>
        private static void UpdateShowlights(string songDirectory, Platform targetPlatform)
        {
            bool hasShowlights = true;
            // TODO: provide some pb feedback for long process
            var info              = DLCPackageData.LoadFromFolder(songDirectory, targetPlatform);
            var showlightsArr     = info.Arrangements.Where(x => x.ArrangementType == ArrangementType.ShowLight).FirstOrDefault();
            var showlightFilePath = showlightsArr.SongXml.File;

            if (String.IsNullOrEmpty(showlightFilePath))
            {
                var xmlFilePath = info.Arrangements[0].SongXml.File;
                var xmlName     = Path.GetFileNameWithoutExtension(xmlFilePath);
                showlightFilePath = Path.Combine(Path.GetDirectoryName(xmlFilePath), xmlName.Split('_')[0] + "_showlights.xml");
                hasShowlights     = false;
            }

            // Generate Showlights
            var showlight = new Showlights();

            showlight.CreateShowlights(info);
            // need at least two showlight elements to be valid
            if (showlight.ShowlightList.Count > 1)
            {
                var showlightStream = new MemoryStream();
                showlight.Serialize(showlightStream);

                using (FileStream file = new FileStream(showlightFilePath, FileMode.Create, FileAccess.Write))
                    showlightStream.WriteTo(file);

                // write xml comments
                Song2014.WriteXmlComments(showlightFilePath);
            }
            else
            {
                // insufficient showlight changes may crash game
                throw new InvalidOperationException("Detected insufficient showlight changes: " + showlight.ShowlightList.Count);
            }

            if (!hasShowlights)
            {
                UpdateAggegrateGraph(songDirectory, targetPlatform, info);
            }
        }