C# 클래스 Nexus.Client.ModManagement.ModFileInstaller

This installs mod files.
상속: IModFileInstaller
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 메소드들

메소드 설명
FinalizeInstall ( ) : void

Finalizes the installation of the files.

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 the file already exists the user is prompted to overwrite the file.

InstallFileFromMod ( string p_strModFilePath, string p_strInstallPath, bool p_booSecondaryInstallPath ) : bool

Installs the speified file from the Mod to the file system.

IsFileLocked ( string filePath ) : bool

Check if the file is in use.

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

A simple constructor that initializes the object with its dependencies.

UninstallDataFile ( string p_strPath, bool p_booSecondaryInstallPath ) : void

Uninstalls the specified file.

If the mod we are uninstalling doesn't own the file, then its version is removed from the overwrites directory. If the mod we are uninstalling overwrote a file when it installed the specified file, then the overwritten file is restored. Otherwise the file is deleted.

보호된 메소드들

메소드 설명
TestDoOverwrite ( string p_strPath ) : bool

Verifies if the given file can be written.

This method checks if the given path is valid. If so, and the file does not exist, the file can be written. If the file does exist, than the user is asked to overwrite the file.

TrimEmptyDirectories ( string p_strStartPath, string p_strStopDirectory ) : void

Deletes any empty directories found between the start path and the end directory.

메소드 상세

FinalizeInstall() 공개 메소드

Finalizes the installation of the files.
public FinalizeInstall ( ) : void
리턴 void

GenerateDataFile() 공개 메소드

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 the file already exists the user is prompted to overwrite the file.
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.
리턴 bool

InstallFileFromMod() 공개 메소드

Installs the speified file from the Mod to the file system.
public InstallFileFromMod ( string p_strModFilePath, string p_strInstallPath, bool p_booSecondaryInstallPath ) : bool
p_strModFilePath string The path of the file in the Mod to install.
p_strInstallPath string The path on the file system where the file is to be installed.
p_booSecondaryInstallPath bool Whether to use the secondary install path.
리턴 bool

IsFileLocked() 공개 메소드

Check if the file is in use.
public IsFileLocked ( string filePath ) : bool
filePath string
리턴 bool

ModFileInstaller() 공개 메소드

A simple constructor that initializes the object with its dependencies.
public ModFileInstaller ( IGameModeEnvironmentInfo p_gmiGameModeInfo, IMod p_modMod, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, IDataFileUtil p_dfuDataFileUtility, TxFileManager p_tfmFileManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, bool p_UsesPlugins, ModManager p_mmModManager ) : 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 Whether the file is a mod or a plugin.
p_mmModManager ModManager
리턴 System

TestDoOverwrite() 보호된 메소드

Verifies if the given file can be written.
This method checks if the given path is valid. If so, and the file does not exist, the file can be written. If the file does exist, than the user is asked to overwrite the file.
protected TestDoOverwrite ( string p_strPath ) : bool
p_strPath string The file path, relative to the Data folder, whose writability is to be verified.
리턴 bool

TrimEmptyDirectories() 보호된 메소드

Deletes any empty directories found between the start path and the end directory.
protected TrimEmptyDirectories ( string p_strStartPath, string p_strStopDirectory ) : void
p_strStartPath string The path from which to start looking for empty directories.
p_strStopDirectory string The directory at which to stop looking.
리턴 void

UninstallDataFile() 공개 메소드

Uninstalls the specified file.
If the mod we are uninstalling doesn't own the file, then its version is removed from the overwrites directory. If the mod we are uninstalling overwrote a file when it installed the specified file, then the overwritten file is restored. Otherwise the file is deleted.
public UninstallDataFile ( string p_strPath, bool p_booSecondaryInstallPath ) : void
p_strPath string The path to the file that is to be uninstalled.
p_booSecondaryInstallPath bool Whether to use the secondary install path.
리턴 void