C# 클래스 Nexus.Client.Mods.Formats.FOMod.FOMod

Encapsulates a FOMod mod archive.
상속: ObservableObject, IMod
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5

보호된 프로퍼티들

프로퍼티 타입 설명
IgnoreFolders List

공개 메소드들

메소드 설명
BeginReadOnlyTransaction ( FileUtil p_futFileUtil ) : void

Starts a read-only transaction.

This puts the FOMod into read-only mode. Read-only mode can greatly increase the speed at which multiple file are extracted.

CompareOrderFoldersFirst ( string x, string y ) : int
ContainsFile ( string p_strPath ) : bool

Determines if the FOMod contains the given file.

EndReadOnlyTransaction ( ) : void

Ends a read-only transaction.

This takes the FOMod out of read-only mode. Read-only mode can greatly increase the speed at which multiple file are extracted.

FOMod ( string p_strFilePath, FOModFormat p_mftModFormat, IEnumerable p_enmStopFolders, string p_strPluginsDirectoryName, IEnumerable p_enmPluginExtensions, IModCacheManager p_mcmModCacheManager, IScriptTypeRegistry p_stgScriptTypeRegistry, bool p_booUsePlugins ) : System

A simple constructor that initializes the FOMod from the specified file.

GetFile ( string p_strFile ) : byte[]

Retrieves the specified file from the fomod.

GetFileList ( ) : List

Retrieves the list of files in this FOMod.

GetFileList ( string p_strFolderPath, bool p_booRecurse ) : List

Retrieves the list of all files in the specified FOMod folder.

IsMatchingVersion ( ) : bool

Determines if last known version is the same as the current version.

ToString ( ) : string

Uses the mod name to represent the mod.

UpdateInfo ( IModInfo p_mifInfo, bool p_booOverwriteAllValues ) : void

Updates the object's properties to the values of the given IModInfo.

보호된 메소드들

메소드 설명
CreateOrReplaceFile ( string p_strPath, byte p_bteData ) : void

Replaces the specified file with the given data.

DeleteFile ( string p_strPath ) : void

Deletes the specified file.

FindPathPrefix ( ) : void

This finds where in the archive the FOMod file structure begins.

This methods finds the path prefix to the folder containing the core files and folders of the FOMod. If there are any files that are above the core folder, than they are given new file names inside the core folder.

GetRealPath ( string p_strPath ) : string

This method adjusts the given virtual path to the actual path to the file in the mod.

This method account for the virtual restructuring of the mod file structure performed by FindPathPrefix().

LoadInfo ( ) : void

Loads the mod metadata from the info file.

LoadInfo ( XmlNode p_xndInfo, bool p_booFillOnlyEmptyValues ) : void

Deserializes an IModInfo from the given XML fragment.

ReplaceFile ( string p_strPath, byte p_bteData ) : void

Replaces the specified file with the given data.

ReplaceFile ( string p_strPath, string p_strData ) : void

Replaces the specified file with the given text.

SaveInfo ( XmlDocument p_xmlDocument ) : XmlNode

Serializes this IModInfo to an XML fragment.

비공개 메소드들

메소드 설명
ArchiveFile_ReadOnlyInitProgressUpdated ( object sender, CancelProgressEventArgs e ) : void

Handles the Archive.ReadOnlyInitProgressUpdated event of the mod's archive file.

This raises the mod's ReadOnlyInitProgressUpdated event.

Archive_FilesChanged ( object sender, EventArgs e ) : void

Handles the Archive.FilesChanged event of the FOMod's archive.

This ensures that the path prefix that points to the folder in the archive that contains the core files and folders of the FOMod is updated when the archive changes.

InitializeMovedArchive ( string p_strPathPrefix ) : string

메소드 상세

BeginReadOnlyTransaction() 공개 메소드

Starts a read-only transaction.
This puts the FOMod into read-only mode. Read-only mode can greatly increase the speed at which multiple file are extracted.
public BeginReadOnlyTransaction ( FileUtil p_futFileUtil ) : void
p_futFileUtil Nexus.Client.Util.FileUtil
리턴 void

CompareOrderFoldersFirst() 공개 정적인 메소드

public static CompareOrderFoldersFirst ( string x, string y ) : int
x string
y string
리턴 int

ContainsFile() 공개 메소드

Determines if the FOMod contains the given file.
public ContainsFile ( string p_strPath ) : bool
p_strPath string The filename whose existence in the FOMod is to be determined.
리턴 bool

CreateOrReplaceFile() 보호된 메소드

Replaces the specified file with the given data.
protected CreateOrReplaceFile ( string p_strPath, byte p_bteData ) : void
p_strPath string The path of the file to replace.
p_bteData byte The new file data.
리턴 void

DeleteFile() 보호된 메소드

Deletes the specified file.
protected DeleteFile ( string p_strPath ) : void
p_strPath string The path of the file to delete.
리턴 void

EndReadOnlyTransaction() 공개 메소드

Ends a read-only transaction.
This takes the FOMod out of read-only mode. Read-only mode can greatly increase the speed at which multiple file are extracted.
public EndReadOnlyTransaction ( ) : void
리턴 void

FOMod() 공개 메소드

A simple constructor that initializes the FOMod from the specified file.
public FOMod ( string p_strFilePath, FOModFormat p_mftModFormat, IEnumerable p_enmStopFolders, string p_strPluginsDirectoryName, IEnumerable p_enmPluginExtensions, IModCacheManager p_mcmModCacheManager, IScriptTypeRegistry p_stgScriptTypeRegistry, bool p_booUsePlugins ) : System
p_strFilePath string The mod file from which to create the FOMod.
p_mftModFormat FOModFormat The format of the mod.
p_enmStopFolders IEnumerable
p_strPluginsDirectoryName string The name of the folder that contains plugins.
p_enmPluginExtensions IEnumerable
p_mcmModCacheManager IModCacheManager The manager for the current game mode's mod cache.
p_stgScriptTypeRegistry IScriptTypeRegistry The registry of supported script types.
p_booUsePlugins bool
리턴 System

FindPathPrefix() 보호된 메소드

This finds where in the archive the FOMod file structure begins.
This methods finds the path prefix to the folder containing the core files and folders of the FOMod. If there are any files that are above the core folder, than they are given new file names inside the core folder.
protected FindPathPrefix ( ) : void
리턴 void

GetFile() 공개 메소드

Retrieves the specified file from the fomod.
Thrown if the specified file /// is not in the fomod.
public GetFile ( string p_strFile ) : byte[]
p_strFile string The file to retrieve.
리턴 byte[]

GetFileList() 공개 메소드

Retrieves the list of files in this FOMod.
public GetFileList ( ) : List
리턴 List

GetFileList() 공개 메소드

Retrieves the list of all files in the specified FOMod folder.
public GetFileList ( string p_strFolderPath, bool p_booRecurse ) : List
p_strFolderPath string The FOMod folder whose file list is to be retrieved.
p_booRecurse bool Whether to return files that are in subdirectories of the given directory.
리턴 List

GetRealPath() 보호된 메소드

This method adjusts the given virtual path to the actual path to the file in the mod.
This method account for the virtual restructuring of the mod file structure performed by FindPathPrefix().
protected GetRealPath ( string p_strPath ) : string
p_strPath string The path to adjust.
리턴 string

IsMatchingVersion() 공개 메소드

Determines if last known version is the same as the current version.
public IsMatchingVersion ( ) : bool
리턴 bool

LoadInfo() 보호된 메소드

Loads the mod metadata from the info file.
protected LoadInfo ( ) : void
리턴 void

LoadInfo() 보호된 메소드

Deserializes an IModInfo from the given XML fragment.
protected LoadInfo ( XmlNode p_xndInfo, bool p_booFillOnlyEmptyValues ) : void
p_xndInfo System.Xml.XmlNode The XML fragment from which to deserialize the .
p_booFillOnlyEmptyValues bool Whether to only overwrite null or empty values.
리턴 void

ReplaceFile() 보호된 메소드

Replaces the specified file with the given data.
protected ReplaceFile ( string p_strPath, byte p_bteData ) : void
p_strPath string The path of the file to replace.
p_bteData byte The new file data.
리턴 void

ReplaceFile() 보호된 메소드

Replaces the specified file with the given text.
protected ReplaceFile ( string p_strPath, string p_strData ) : void
p_strPath string The path of the file to replace.
p_strData string The new file text.
리턴 void

SaveInfo() 보호된 메소드

Serializes this IModInfo to an XML fragment.
protected SaveInfo ( XmlDocument p_xmlDocument ) : XmlNode
p_xmlDocument System.Xml.XmlDocument The to use to create the XML elements /// created during the unparsing.
리턴 System.Xml.XmlNode

ToString() 공개 메소드

Uses the mod name to represent the mod.
public ToString ( ) : string
리턴 string

UpdateInfo() 공개 메소드

Updates the object's properties to the values of the given IModInfo.
public UpdateInfo ( IModInfo p_mifInfo, bool p_booOverwriteAllValues ) : void
p_mifInfo IModInfo The whose values /// are to be used to update this object's properties.
p_booOverwriteAllValues bool Whether to overwrite the current info values, /// or just the empty ones.
리턴 void

프로퍼티 상세

IgnoreFolders 보호되어 있는 프로퍼티

protected List IgnoreFolders
리턴 List