C# Class Nexus.Client.ModManagement.ModFileUpgradeInstaller

This installs mod files when a mod is being upgraded.
This differs from the regular ModFileInstaller in that installed files are installed overtop of their current location. If a file being installed has been previously installed, this installer will write the file to the same location. Thus, if the file is in the overwrite folder, this installer will write the file to the overwrite folder; if the file is in the main installation folder, this installer will write the file in the main installation folder. If a file being installed has not been previously installed, it is installed as usual.
Inheritance: ModFileInstaller
Mostra file Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
FinalizeInstall ( ) : void

Finalizes the installation of the files.

This removes all of the file that weren't reinstalled during the upgrade.

GenerateDataFile ( string p_strPath, byte p_bteData, bool p_booSecondaryInstallPath ) : bool

Writes the file represented by the given byte array to the given path.

This method writes the given data as a file at the given path, if it is owned by the mod being upgraded. If the specified data file is not owned by the mod being upgraded, the file is instead written to the overwrites directory. If the file was not previously installed by the mod, then the normal install rules apply, including confirming overwrite if applicable.

ModFileUpgradeInstaller ( IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins ) : System

A simple constructor that initializes the object with its dependencies.

Method Details

FinalizeInstall() public method

Finalizes the installation of the files.
This removes all of the file that weren't reinstalled during the upgrade.
public FinalizeInstall ( ) : void
return void

GenerateDataFile() public method

Writes the file represented by the given byte array to the given path.
This method writes the given data as a file at the given path, if it is owned by the mod being upgraded. If the specified data file is not owned by the mod being upgraded, the file is instead written to the overwrites directory. If the file was not previously installed by the mod, then the normal install rules apply, including confirming overwrite if applicable.
Thrown if is /// not safe.
public GenerateDataFile ( string p_strPath, byte p_bteData, bool p_booSecondaryInstallPath ) : bool
p_strPath string The path where the file is to be created.
p_bteData byte The data that is to make up the file.
p_booSecondaryInstallPath bool Whether to use the secondary install path.
return bool

ModFileUpgradeInstaller() public method

A simple constructor that initializes the object with its dependencies.
public ModFileUpgradeInstaller ( IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins ) : System
p_gmiGameModeInfo IGameModeEnvironmentInfo The environment info of the current game mode.
p_modMod IMod The mod being installed.
p_ilgInstallLog IInstallLog The install log to use to log file installations.
p_pmgPluginManager IPluginManager The plugin manager.
p_dfuDataFileUtility IDataFileUtil The utility class to use to work with data files.
p_tfmFileManager ChinhDo.Transactions.TxFileManager The transactional file manager to use to interact with the file system.
p_dlgOverwriteConfirmationDelegate ConfirmItemOverwriteDelegate The method to call in order to confirm an overwrite.
p_UsesPlugins bool Game using plugin or mods (True for plugins).
return System