Click or drag to resize

ModDirectory Class

Helper class used to manage a local directory where mods are located. Helps developers to manage a specific directory where mods should be installed.
Inheritance Hierarchy
SystemObject
  UModModDirectory

Namespace:  UMod
Assembly:  UMod (in UMod.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class ModDirectory

The ModDirectory type exposes the following members.

Constructors
  NameDescription
Public methodModDirectory(DirectoryInfo, Boolean, Boolean)
Initializes a new instance of the ModDirectory class
Public methodModDirectory(String, Boolean, Boolean)
Initializes a new instance of the ModDirectory class
Top
Properties
  NameDescription
Public propertyAllowSubDirectories
Should sub folders of Location also be detected. When true, sub folders will be checked reccursivley as well as the target folder.
Public propertyCaseSensitive
Are mod name searches case sensitive. Default is false.
Public propertyExists
Check whether the target mod directory actually exists. The directory should exists otherwise you may receive DirectoryNotFoundException when calling associated methods.
Public propertyHasMods
Allows the developer to determine whether any mods are installed. This property will return true if there are any mods located in the Location directory.
Public propertyLocation
Get the DirectoryInfo for this current ModDirectory.
Public propertyModCount
Allows the devloper to determine how many mods are installed. Get the number of mods that are inside the directory.
Top
Methods
  NameDescription
Public methodCreate
Attempts to create the mod directory at the file system Location. The mod directory should exist before calling other associated methods.
Public methodStatic memberGetMod(FileInfo)
Public methodGetMod(Byte, String)
Public methodGetMod(String, String)
Public methodGetMod(ModIdentifier, String)
Public methodStatic memberGetModNameFromPath
Public methodGetModNames
Public methodStatic memberGetModPath(FileInfo)
Public methodGetModPath(Byte, String)
Public methodGetModPath(String, String)
Public methodGetModPath(ModIdentifier, String)
Public methodGetModPaths
Public methodGetModPaths(String)
Public methodGetMods
Public methodGetMods(String)
Public methodInstallModFrom
Public methodInstallModFromAsync
Public methodStatic memberIsModFile
Returns true if the specified FileInfo is a valid mod file.
Public methodIsModInstalled(Byte, String)
Public methodIsModInstalled(String, String)
Attempts to search through the mod directory looking for a mod with the specified name and version. If a mod with the specified name and version was found then the return value will be true.
Public methodIsModInstalled(ModIdentifier, String)
Public methodRefresh
Refreshes the directory location in order to detect newly added mods. If you add a new mod into the directory location then you will need to call this method in order for it to be detcted and returned by all other methods.
Top
See Also