OpenBve.ManagedContent.GetInstalledPackageDirectory C# (CSharp) Méthode

GetInstalledPackageDirectory() static private méthode

Gets the directory of the specified package if installed.
If multiple instances of the package exists, this function returns the first one it encounters.
static private GetInstalledPackageDirectory ( string package ) : string
package string The package name.
Résultat string
        internal static string GetInstalledPackageDirectory(string package)
        {
            for (int i = 0; i < Program.FileSystem.ManagedContentFolders.Length; i++) {
                string directory = OpenBveApi.Path.CombineDirectory(Program.FileSystem.ManagedContentFolders[i], package);
                if (Directory.Exists(directory)) {
                    return directory;
                }
            }
            return null;
        }